Re: RE: [RFC] Fast Parameter Parsing API

From: Date: Mon, 26 May 2014 10:11:48 +0000
Subject: Re: RE: [RFC] Fast Parameter Parsing API
References: 1 2 3 4 5 6 7 8 9 10  Groups: php.internals 
Request: Send a blank email to internals+get-74496@lists.php.net to get a copy of this message
On Mon, May 26, 2014 at 11:39 AM, Bob Weinand <bobwei9@hotmail.com> 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

« previous php.internals (#74496) next »