Re: [PHP-DEV] Named Parameters

2010-04-04 Thread Stanislav Malyshev
Hi! http://diveintopython.org/power_of_introspection/optional_arguments.html This approach could work too, except that simple literal means constant in PHP, unlike Python. So array syntax might be more natural, but both can work I guess. -- Stanislav Malyshev, Zend Software Architect s...@

Re: [PHP-DEV] Named Parameters

2010-04-04 Thread Gregory
A small comment: I don't think named parameters should seriously affect performance if we check for their presence during the call. That is to say, if a call has no named parameters, use what we use now. Otherwise, push an extra hash variable on to the end of the stack. Creating this hash varia

Re: [PHP-DEV] On constructors: BC Break and Class compiler Improvements

2010-04-04 Thread Stanislav Malyshev
Hi! Given the feedback on the list I think it's ok. Please make the BC break clear in the NEWS file so I remember to copy it in the announcement. OK, done. -- Stanislav Malyshev, Zend Software Architect s...@zend.com http://www.zend.com/ (408)253-8829 MSN: s...@zend.com -- PHP Internals -

Re: [PHP-DEV] Named Parameters

2010-04-04 Thread Johannes Schlüter
Hi, I'm not fully convinced we really need it, I had some moments in the past where I wished they existed, but always found good solutions. That said: On Sun, 2010-04-04 at 18:28 -0400, Gregory wrote: > The question I have is if we are not copying the array semantics > anymore, whether we shoul

Re: [PHP-DEV] Named Parameters

2010-04-04 Thread Pierre Joye
hi, On Mon, Apr 5, 2010 at 12:07 AM, Stanislav Malyshev wrote: > 3. Combining named and un-named params can get weird - i.e. foo(1,2,3) is > simple, foo(1, 2, bar => 3) is doable, but foo(1, 2, bar => 3, 4) would be > trouble, since it is not clear at all where 4 should go to. Moreover, > catchi

Re: [PHP-DEV] Named Parameters

2010-04-04 Thread Gregory
err, sorry, to correct my example: function abc($a) { var_export(func_get_args()); } abc(4, 'a' => 3); would output array(0 => 4, 'a' => 3) Greg Gregory wrote: Those are some good points. I would say with regard to 3, that we have the same problem (sic) with defining arrays in PHP, in terms

Re: [PHP-DEV] Named Parameters

2010-04-04 Thread Gregory
Those are some good points. I would say with regard to 3, that we have the same problem (sic) with defining arrays in PHP, in terms of it not being clear what results from array(1, 2, 'a' => $b, 4). Although we could perfectly copy the array definition semantics, I think you're right, that abc(

Re: [PHP-DEV] Named Parameters

2010-04-04 Thread Stanislav Malyshev
Hi! The problem however is when an function accepts varargs (usually named "..."). if we however bring in strictct-ish naming convention I don't see any immediate problems Varargs shouldn't be a problem and we don't even need ... there - we can just assume every function has implicit

RE: [PHP-DEV] Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_2/NEWS branches/PHP_5_2/ext/filter/logical_filters.c branches/PHP_5_3/NEWS branches/PHP_5_3/ext/filter/logical_filters.c trunk/ext/filter/

2010-04-04 Thread Jared Williams
> -Original Message- > From: Rasmus Lerdorf [mailto:ras...@lerdorf.com] > Sent: 03 April 2010 02:44 > To: Jared Williams > Cc: internals@lists.php.net > Subject: Re: [PHP-DEV] Re: [PHP-CVS] svn: /php/php-src/ > branches/PHP_5_2/NEWS > branches/PHP_5_2/ext/filter/logical_filters.c > b

[PHP-DEV] Re: Wiki-page for unicode status and ideas

2010-04-04 Thread Apis SARL
Hi, If it can help you, I've published this source ( http://www.phpcs.com/codes/ENCODAGE-UTF16_51501.aspx ) to resolve some matters with big Chars. regards, Greg Le 01/04/2010 01:13, Jacob Oettinger a écrit : > Hi > David Zülke kindly let me know that I mis-posted the message below by posting >