At 09:33 PM 9/7/2001 +0100, Wez Furlong wrote:
>On 07/09/01, "Andrei Zmievski" <[EMAIL PROTECTED]> wrote:
> > If this is implemented (I think Andi may have some thoughts about this),
>Hopefully not bad thoughts!

I do have some bad thoughts about it. I'm worried that if we supply such an 
easy function to parse incoming hash table's people will start writing a 
lot of PHP functions which accept hash tables instead of regular argument 
lists. This is much slower and I think it's better to stay with the way 
functions are written today and not change the standard. There are very few 
functions which accept arrays as parameters and most of them are functions 
which act on Hashes so it makes sense.
I think when you supply an API function like this which is very easy to 
use, it will start being misused quickly!
What cases do you feel this is needed and are you sure regular argument 
lists aren't good enough?

> > zend_parse_parameters_hash(HASH_OF(my_zval), "{s:firstname}|{s:lastname}
> > {l:age}", &firstname, &firstname_len, &lastname, &lastname_len, &age);
>Yes - much better.  I originally thought of something like this (a bit
>like the python dictionary syntax people have been talking about recently):
>But that is hard to read, so I thought of splitting it up.

PHP Development Mailing List <>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to