Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:82725 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 42752 invoked from network); 15 Feb 2015 13:45:57 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Feb 2015 13:45:57 -0000 Authentication-Results: pb1.pair.com header.from=ajf@ajf.me; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=ajf@ajf.me; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain ajf.me designates 192.64.116.216 as permitted sender) X-PHP-List-Original-Sender: ajf@ajf.me X-Host-Fingerprint: 192.64.116.216 imap10-3.ox.privateemail.com Received: from [192.64.116.216] ([192.64.116.216:38652] helo=imap10-3.ox.privateemail.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id EF/75-06835-213A0E45 for ; Sun, 15 Feb 2015 08:45:55 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.privateemail.com (Postfix) with ESMTP id DB4512400C2; Sun, 15 Feb 2015 08:45:51 -0500 (EST) X-Virus-Scanned: Debian amavisd-new at imap10.ox.privateemail.com Received: from mail.privateemail.com ([127.0.0.1]) by localhost (imap10.ox.privateemail.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 1YygjbpfVpv6; Sun, 15 Feb 2015 08:45:51 -0500 (EST) Received: from oa-res-26-240.wireless.abdn.ac.uk (oa-res-26-240.wireless.abdn.ac.uk [137.50.26.240]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.privateemail.com (Postfix) with ESMTPSA id 4A6002400AA; Sun, 15 Feb 2015 08:45:51 -0500 (EST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) In-Reply-To: Date: Sun, 15 Feb 2015 13:45:49 +0000 Cc: PHP Internals Content-Transfer-Encoding: quoted-printable Message-ID: <8814DFF5-3B94-4B2D-8A02-49B17AC307F5@ajf.me> References: <6FD9B9A4-E831-4D4F-AD66-BD04D8C37991@ajf.me> To: Xinchen Hui X-Mailer: Apple Mail (2.2070.6) Subject: Re: [PHP-DEV] [VOTE] Big Integer Support From: ajf@ajf.me (Andrea Faulds) Hi, > On 15 Feb 2015, at 12:39, Xinchen Hui wrote: >=20 > On Sun, Feb 15, 2015 at 10:46 AM, Andrea Faulds wrote: >> Hi everyone, >>=20 >> I should=E2=80=99ve done this a long time ago, but I=E2=80=99m going = to hold a vote on this RFC. The implementation isn=E2=80=99t finished, = but the remaining work isn=E2=80=99t impossible to surmount (though help = would certainly be appreciated). RFCs can be put to vote without = implementations (or so says https://wiki.php.net/rfc/howto), so the fact = the implementation is unfinished isn=E2=80=99t necessarily a blocker. > for such a big change, the implementation self is also important, > there was some RFC accepted with "not good" implementation, which > cause lots of troubles for us to maintaining . This vote isn=E2=80=99t to be thought of as accepting the = implementation, merely the feature. If the implementation isn=E2=80=99t = good enough, the feature could actually be dropped for PHP 7, as much as = I hope that won=E2=80=99t happen. >>=20 >> Putting it to a vote, finally, means I can stimulate further = discussion (let=E2=80=99s face it, most discussion on a given RFC = happens during voting), and importantly, see how much support the RFC = has in order motivate myself to finish the implementation. >>=20 >> I think this would be a useful feature for PHP. It brings PHP into = line with other modern dynamic languages in having integers of arbitrary = size. It makes integer behaviour both more intuitive and more consistent = across platforms. It (finally) adds a means for handling of 64-bit (and = larger) integers in 32-bit environments. I think allowing integers to = grow as needed and not having to worry about platform-specific details = is very =E2=80=9CPHP=E2=80=9D, as well. >>=20 > from your RFC: > " > but obviously the implementations of anything dealing with integers > may need to be changed." >=20 > this sounds too much compare to the benefits it brings.. (User can use > bcmath or other similar thing to deal with big int). It=E2=80=99s not a massive change. All the places in core have already = been changed. Most extensions taking integers do so via zpp=E2=80=99s = =E2=80=9Cl=E2=80=9D type (or FAST_ZPP=E2=80=99s Z_PARAM_LONG), which = handles bigints properly. The main issue is functions accepting zvals = (=E2=80=9Cz=E2=80=9D or Z_PARAM_ZVAL). In such cases, the change is = usually two lines of code to add an IS_BIGINT case to a switch. > and actually, I'd prefer this to be a extension instead of get it into = core.. >=20 > too much changes for little gains.. >=20 > Thus, I voted -1 on this. Alright, I can understand your perspective. -- Andrea Faulds http://ajf.me/