Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:74503 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 29502 invoked from network); 26 May 2014 12:20:53 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 May 2014 12:20:53 -0000 Authentication-Results: pb1.pair.com header.from=bobwei9@hotmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=bobwei9@hotmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain hotmail.com designates 65.55.111.174 as permitted sender) X-PHP-List-Original-Sender: bobwei9@hotmail.com X-Host-Fingerprint: 65.55.111.174 blu0-omc4-s35.blu0.hotmail.com Windows 2000 SP4, XP SP1 Received: from [65.55.111.174] ([65.55.111.174:20062] helo=blu0-omc4-s35.blu0.hotmail.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2A/91-19814-4A133835 for ; Mon, 26 May 2014 08:20:52 -0400 Received: from BLU436-SMTP78 ([65.55.111.135]) by blu0-omc4-s35.blu0.hotmail.com with Microsoft SMTPSVC(6.0.3790.4675); Mon, 26 May 2014 05:20:49 -0700 X-TMN: [9lGvos1SZqQSML7XFc7Vt8wDhZRw+zwK] X-Originating-Email: [bobwei9@hotmail.com] Message-ID: Received: from bobweinandsimac.fritz.box ([188.115.17.188]) by BLU436-SMTP78.smtp.hotmail.com over TLS secured channel with Microsoft SMTPSVC(8.0.9200.16384); Mon, 26 May 2014 05:20:47 -0700 Content-Type: multipart/alternative; boundary="Apple-Mail=_26F784BE-4501-477F-95F4-B412DED9D3E4" MIME-Version: 1.0 (Mac OS X Mail 7.2 \(1874\)) In-Reply-To: Date: Mon, 26 May 2014 14:20:42 +0200 CC: Andrea Faulds , Dmitry Stogov , Zeev Suraski , Xinchen Hui , PHP Internals , Stas Malyshev , Andi Gutmans , Nikita Popov References: <-6285448086228171932@unknownmsgid> <67d97efff27b61e45ef74d4f4339b4b3@mail.gmail.com> <962B3020-200F-45D2-8FEC-AD7A0BFDA50E@ajf.me> To: Pierre Joye X-Mailer: Apple Mail (2.1874) X-OriginalArrivalTime: 26 May 2014 12:20:48.0107 (UTC) FILETIME=[ECFB63B0:01CF78DC] Subject: Re: [PHP-DEV] RE: [RFC] Fast Parameter Parsing API From: bobwei9@hotmail.com (Bob Weinand) --Apple-Mail=_26F784BE-4501-477F-95F4-B412DED9D3E4 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="us-ascii" Am 26.5.2014 um 12:11 schrieb Pierre Joye : > On Mon, May 26, 2014 at 11:39 AM, Bob Weinand = wrote: >> Actually, that's exactly my the original API, just with ZP_OPTIONAL = instead of numbers for counts: >=20 > Where was it proposed? I missed it. It wasn't proposed, it just was the initial patch I showed Dmitry when I = made a small PoC. >> ZEND_PARSE_PARAMETERS(ZP_ARRAY(input) ZP_LONG(offset) ZP_OPTIONAL = ZP_ZVAL(z_length) ZP_BOOL(preserve_keys), { return; }) >> (The return at the end is the error branch) >>=20 >> I still prefer it that way, but Dmitry doesn't... >=20 > Pretty much the same to me, with the same conclusion as well, sadly. >=20 > I do not find it more readable than the one in the RFC and it does not > solve the double or sometimes triple declarations of the arguments. > And I do not even want to think about how it will look if we implement > named arguments (let face it, we will have them). I highly doubt we can solve that problem. I think of it being = impossible. (When not trying abysmal things like parsing code upon compiling) >> It's the most readable I still think. >=20 > zpp current usage is much more readable to me and less error prone > while writing (clang plugin helping to check the syntax, see Johannes > tools). Actually, with the new implementation, you don't even need a plugin for checking types etc.. Even gcc does that for you with a nice warning. > May I point you to my questions in this thread about extending the > reflection struct, add the necessary info (types) and maybe do the > naming args while being at it? See above, I think of it as impossible. > Cheers, > --=20 > Pierre >=20 > @pierrejoye | http://www.libgd.org Bob= --Apple-Mail=_26F784BE-4501-477F-95F4-B412DED9D3E4--