Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:70937 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 64981 invoked from network); 30 Dec 2013 22:12:50 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 Dec 2013 22:12:50 -0000 Authentication-Results: pb1.pair.com smtp.mail=yohgaki@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=yohgaki@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.217.179 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.217.179 mail-lb0-f179.google.com Received: from [209.85.217.179] ([209.85.217.179:58525] helo=mail-lb0-f179.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 13/46-33070-0EFE1C25 for ; Mon, 30 Dec 2013 17:12:49 -0500 Received: by mail-lb0-f179.google.com with SMTP id w7so5738322lbi.24 for ; Mon, 30 Dec 2013 14:12:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=NDik9WjToVXCNI8pEY+YJQfAbOwgYabgYyd0jhUDLa4=; b=wwBfgHQa8rzGjcyUjFgS9DP40IbgDiD6HU86OjTyUuwloK8Mk9X5NLTDms/lJBgnV5 AygsLBYQnHQsqM8+0yJxI7Fwnt7ljw1ZkomhRNz/fvT37UqVupoEsZj0FHWGFlRNG3WU 3Nit/s8vQcAze1I9DgpUUlv9x33FEzj/gusKHqkk+p9lOOfWj9GhaoDmLN4Mw+P6+PqI iYD/VrlVlFdbjzzGhPVa5n3ZcA3wFjkmSNQZPxRvGfRZsR7WJ1FJc4O3+BvKVEJSH0DJ XYBIetZYV7WmOng/GIRdTHbouZTw077LPiEFQ+x5LTsPZdDIr9FG9sDtyZmiJmeb60ZQ Y5Nw== X-Received: by 10.112.139.72 with SMTP id qw8mr27084568lbb.16.1388441565604; Mon, 30 Dec 2013 14:12:45 -0800 (PST) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.112.6.68 with HTTP; Mon, 30 Dec 2013 14:12:05 -0800 (PST) In-Reply-To: <52C1EDC7.5060807@sugarcrm.com> References: <52C1DB86.1030909@sugarcrm.com> <52C1E61B.8050404@sugarcrm.com> <004501cf05a9$e980fbb0$bc82f310$@tutteli.ch> <52C1EDC7.5060807@sugarcrm.com> Date: Tue, 31 Dec 2013 07:12:05 +0900 X-Google-Sender-Auth: X-ZScmUvzvgbHnRZ8KZVhEq6Bxo Message-ID: To: Stas Malyshev Cc: Robert Stoll , Nikita Popov , "internals@lists.php.net" Content-Type: multipart/alternative; boundary=089e0112c1ba4f307b04eec7bebe Subject: Re: [PHP-DEV] GMP object and is_scalar() From: yohgaki@ohgaki.net (Yasuo Ohgaki) --089e0112c1ba4f307b04eec7bebe Content-Type: text/plain; charset=UTF-8 Hi Stas, On Tue, Dec 31, 2013 at 7:03 AM, Stas Malyshev wrote: > > Only classes that should be evaluated as scalar should implement this > > magic method. > > We already have type convertors. "scalar" is not a type, it's a group of > types. I don't think it makes sense to convert something to an abstract > scalar - it should be specific scalar type. Should it? PHP is weakly typed language. I haven't thought well for scalar object yet and has to consider various cases. One thing clear to me is users expects GMP numbers behave like scalar numbers most likely. Yet another option for PHP 5.6 is to note GMP numbers as EXPERIMENTAL. There are many issues to resolve. IMHO. Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net --089e0112c1ba4f307b04eec7bebe--