Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:74496 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 13563 invoked from network); 26 May 2014 10:11:53 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 May 2014 10:11:53 -0000 Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.169 as permitted sender) X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.216.169 mail-qc0-f169.google.com Received: from [209.85.216.169] ([209.85.216.169:61560] helo=mail-qc0-f169.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 5A/09-60353-76313835 for ; Mon, 26 May 2014 06:11:52 -0400 Received: by mail-qc0-f169.google.com with SMTP id e16so11923661qcx.14 for ; Mon, 26 May 2014 03:11:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=zVaxf1KE2uODBhAAnjy3aSV7yP1z3ryQGBtBbiBq73I=; b=AeNCXzyIf+Z5RG8YrvSqIJbxW5GJwbhsPlB/5slo/dAkMIyzCLS5pT6vVlQDo2mVRr nwjcHhigeDnEnvfOVHCZGBRzldBhNNNcnZnfxcPx6nalM6n84YN923lSAyGLdGjIt3ik GEPMWBFxJutqTK+r53zHkP7bJ1nR2RZotTx+m3K4Vi9KHrgC7Q6LizrJgUwI04dW1DHD c+V0Z6Us6IaZnsgYBgj3WCisJza0E3uh0eSFvAZaGysDsFzI+M/N59B3FNboBAwVs+mC tU/wmX5Cr20l50nddvFo3nPcDvcChTPDcNG0W0YwlzSY8pJVgLs7fri/DU9jKIcGyZXY 1KFQ== MIME-Version: 1.0 X-Received: by 10.140.40.180 with SMTP id x49mr29322865qgx.16.1401099108349; Mon, 26 May 2014 03:11:48 -0700 (PDT) Received: by 10.140.47.231 with HTTP; Mon, 26 May 2014 03:11:48 -0700 (PDT) In-Reply-To: References: <-6285448086228171932@unknownmsgid> <67d97efff27b61e45ef74d4f4339b4b3@mail.gmail.com> <962B3020-200F-45D2-8FEC-AD7A0BFDA50E@ajf.me> Date: Mon, 26 May 2014 12:11:48 +0200 Message-ID: To: Bob Weinand Cc: Andrea Faulds , Dmitry Stogov , Zeev Suraski , Xinchen Hui , PHP Internals , Stas Malyshev , Andi Gutmans , Nikita Popov Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] RE: [RFC] Fast Parameter Parsing API From: pierre.php@gmail.com (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: Where was it proposed? I missed it. > 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) > > I still prefer it that way, but Dmitry doesn't... Pretty much the same to me, with the same conclusion as well, sadly. 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). > It's the most readable I still think. 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). 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? Cheers, -- Pierre @pierrejoye | http://www.libgd.org