Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:78240 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 84634 invoked from network); 22 Oct 2014 19:32:48 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Oct 2014 19:32:48 -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 198.187.29.244 as permitted sender) X-PHP-List-Original-Sender: ajf@ajf.me X-Host-Fingerprint: 198.187.29.244 imap1-3.ox.privateemail.com Received: from [198.187.29.244] ([198.187.29.244:41978] helo=imap1-3.ox.privateemail.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 8E/93-63701-06608445 for ; Wed, 22 Oct 2014 15:32:48 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.privateemail.com (Postfix) with ESMTP id 1CBF2B0007B; Wed, 22 Oct 2014 15:32:45 -0400 (EDT) X-Virus-Scanned: Debian amavisd-new at imap1.ox.privateemail.com Received: from mail.privateemail.com ([127.0.0.1]) by localhost (imap1.ox.privateemail.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 6uC8Y5GWorf7; Wed, 22 Oct 2014 15:32:44 -0400 (EDT) Received: from oa-res-26-28.wireless.abdn.ac.uk (oa-res-26-28.wireless.abdn.ac.uk [137.50.26.28]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.privateemail.com (Postfix) with ESMTPSA id 7A9B9B00068; Wed, 22 Oct 2014 15:32:43 -0400 (EDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.0 \(1990.1\)) In-Reply-To: <54480580.9040302@sugarcrm.com> Date: Wed, 22 Oct 2014 20:32:41 +0100 Cc: Zeev Suraski , Dmitry Stogov , PHP Internals Content-Transfer-Encoding: quoted-printable Message-ID: <4F848DB0-0266-46A0-9805-2B2BF22CAC33@ajf.me> References: <66B7B28C-2651-4A71-AC2A-55D4C7BB3DDC@ajf.me> <866A39C7-6F11-408D-8BCA-594BA22E8569@ajf.me> <5447682B.2080100@sugarcrm.com> <019325A5-4F82-4179-B4D7-29E5649B2616@ajf.me> <54480580.9040302@sugarcrm.com> To: Stas Malyshev X-Mailer: Apple Mail (2.1990.1) Subject: Re: [PHP-DEV] [RFC] Safe Casting Functions From: ajf@ajf.me (Andrea Faulds) > On 22 Oct 2014, at 20:29, Stas Malyshev = wrote: >=20 >> No, it wouldn=E2=80=99t require a 2/3 majority. The optimisation me = and >> Dmitry are referring to is merely an optimisation, it=E2=80=99s an >> implementation detail. This doesn=E2=80=99t touch any of the language = spec or >> the language as understood by users. >=20 > Sorry, it's not "merely an optimization", it's making it an engine > primitive, like (int) or empty() are. Yes, that=E2=80=99s still merely an implementation detail. If HHVM = decides to make explode() into an opcode, it=E2=80=99s not a language = change. It is not any different if PHP does the same. >> Or would you argue that the fact is_long is now an opcode is a >> language change, and Dmitry should=E2=80=99ve made an RFC before = making a >> change that is completely non-user-facing?! >=20 > is_long existed long before that, and nothing changed for it. So why is it a language change? > You propose to add completely new type conversion rules into the = engine, in > addition to ones already present and used there. It's not the same as > merely changing how the engine internally runs pre-existing code. The > new rules are definitely becoming major part of the language, not an > implementation detail of some random function like str_pad. No, they=E2=80=99re just a set of new validation functions. > Saying "oh, we just add it like a random function and _only then_ = we'll > make it an opcode and it will be implementation detail" sounds a lot > like gaming the system to me. =E2=80=A6what? -- Andrea Faulds http://ajf.me/