Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:74504 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 35312 invoked from network); 26 May 2014 13:36:39 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 May 2014 13:36:39 -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.192.41 as permitted sender) X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.192.41 mail-qg0-f41.google.com Received: from [209.85.192.41] ([209.85.192.41:52688] helo=mail-qg0-f41.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id CA/32-19814-56343835 for ; Mon, 26 May 2014 09:36:38 -0400 Received: by mail-qg0-f41.google.com with SMTP id j5so12171864qga.28 for ; Mon, 26 May 2014 06:36:35 -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=a7NC4aw7axtrCZav6TRSWkRx9s5aDV4HbqENkCboG2w=; b=Itqjk368X5hlijbMjohRc/yP1ETt8u4BDLPMvJJxBVaHLdIxKuGdL+/XcMbTSp9xDd 70TVo6zwTwhSO132cLDEXLRB5QqhvOi3jsbGu19YZUrWpvLyk4YzM5/nxox80w565gPF EBOniJ0NoEowyTcp0DdQTdn1qPDY+nhehwbNpJ+YA5rkSepcca+qeHrnfgpB0Kv79eBf iy7Mju9EMoVIWVuzBMj0FTP1WiovIDx9MGbkd/Vd00OtLc1fv2q2lPgxEPwhLKEwosYJ AeNRytDjgiAmPO3m1zkd45zmTAxqRMt1vRSPn7esnMsz/HVEiraBFp5YAJ3kHvKBEaGB tTQw== MIME-Version: 1.0 X-Received: by 10.140.101.99 with SMTP id t90mr4529096qge.115.1401111394983; Mon, 26 May 2014 06:36:34 -0700 (PDT) Received: by 10.140.47.231 with HTTP; Mon, 26 May 2014 06:36:34 -0700 (PDT) In-Reply-To: References: <-6285448086228171932@unknownmsgid> <67d97efff27b61e45ef74d4f4339b4b3@mail.gmail.com> <962B3020-200F-45D2-8FEC-AD7A0BFDA50E@ajf.me> Date: Mon, 26 May 2014 15:36:34 +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 2:20 PM, Bob Weinand wrote: > 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: >> >> 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) >>> >>> 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). > > 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. >> >> 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. Ok, that's impossible. Now let us spend some time on that to figure out why :) -- Pierre @pierrejoye | http://www.libgd.org