[PHP-DEV] CVS Account Request: rains

2006-01-12 Thread ��
Translating the documentation -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] CVS Account Request: gwang

2006-01-12 Thread George Wang
Rasmus Lerdorf (rasmus) told me to fill out the form. :-) It is for maintaining source code for LiteSpeed PHP SAPI module, the part of the CVS repository I need to access to is php-src/sapi/litespeed, if our module is accepted. -- PHP Internals - PHP Runtime Development Mailing List To unsubscr

Re: [PHP-DEV] Re: Named arguments revisited

2006-01-12 Thread Jason Garber
Hello Andi, I think the "sexy" syntax is a significant plus, even if associative arrays were used in the implementation. Is it a complex thing to implement? -- Best regards, Jasonmailto:[EMAIL PROTECTED] Thursday, January 12, 2006, 6:44:59 PM, you wrote: AG>

Re: [PHP-DEV] Re: Named arguments revisited

2006-01-12 Thread Andi Gutmans
In my opinion, as Ilia stated passing an associative array does the job quite well for the use-case where named arguments would be useful. Sure it might be a tad-bit sexier that you don't have to write array() but the truth is that the implementation would probably still use an array. Unlike Ada

Re: [PHP-DEV] Re: Named arguments revisited

2006-01-12 Thread Jason Garber
Hello Jared, JW> PHP is all about using a simple means to an end and getting the job JW> done. Named parameters makes coding easier, not harder. Well stated. -- Best regards, Jasonmailto:[EMAIL PROTECTED] -- PHP Internals - PHP Runtime Development Mailing List T

Re: [PHP-DEV] Re: Named arguments revisited

2006-01-12 Thread Jared White
On Jan 12, 2006, at 7:22 AM, Ilia Alshanetsky wrote: Aidan Lister wrote: As useful functions tend to increase in complexity over time, often so does the number of parameters. It soon gets to the point where function calls look like: foo(true, false, false, false, false, true) The rest of the

Re: [PHP-DEV] Re: Named arguments revisited

2006-01-12 Thread Ron Korving
Another nice use case is querybuilders: $query = buildQuery(select: $columns, from: $tables, leftjoin: $leftjoins, limit: 10); It's nice to be able to stick to what matters, and omit everything that doesn't matter (ordinary joins, where, group by, having). With func_get_args() returning an assoc

Re: [PHP-DEV] Re: Named arguments revisited

2006-01-12 Thread Hartmut Holzgraefe
Andrei Zmievski wrote: Hartmut, there are only 2 or 3 of those functions where the order differs. but it's the fact that it differs at all that counts ... -- Hartmut Holzgraefe, Senior Support Engineer. MySQL AB, www.mysql.com -- PHP Internals - PHP Runtime Develop

Re: [PHP-DEV] Re: Named arguments revisited

2006-01-12 Thread Andrei Zmievski
Hartmut, there are only 2 or 3 of those functions where the order differs. -Andrei On Jan 12, 2006, at 8:49 AM, Hartmut Holzgraefe wrote: Frank M. Kromann wrote: And if you have many parameters to functions you still need to look at the definition (or documentation) to figure out what par

[PHP-DEV] LiteSpeed SAPI patch and cvs account request

2006-01-12 Thread George Wang
Hi, We developed a dedicated PHP SAPI module for our LiteSpeed web server a while ago, it has been tested in various production environment for a while, and is pretty stable now. This module combines the advantage of both FastCGI SAPI and mod_php, it supports distributed PHP configuration in .hta

Re: [PHP-DEV] Re: Named arguments revisited

2006-01-12 Thread Hartmut Holzgraefe
Frank M. Kromann wrote: And if you have many parameters to functions you still need to look at the definition (or documentation) to figure out what parameters the function takes. It's not a big problem to look at the order at the same time. lets face the opposite direction for a second: all th

Re: [PHP-DEV] Re: Named arguments revisited

2006-01-12 Thread Brian Moon
I think that's a poor example. I see a highlighting problem split into multiple classes. The rule in my projects and at work is don't make a new function/method unless it is going to be reused. So, making multiple functions just so you don't have to pass a lot of stuff to one function is sill

Re: [PHP-DEV] Re: Named arguments revisited

2006-01-12 Thread Robert Cummings
On Thu, 2006-01-12 at 03:58, Michael Walter wrote: > > To quote Jason, "In [the] way, [that] the user doesn't have to > remember the default values, > just the offsets.". *slaps self* Duh :) Cheers, Rob. -- .. | InterJinn Application F

RE: [PHP-DEV] Re: Named arguments revisited

2006-01-12 Thread Frank M. Kromann
> > If you have too many parameters that you want to start omitting parameters when calling a function, its probably time to refactor. > And if you have many parameters to functions you still need to look at the definition (or documentation) to figure out what parameters the function takes. It'

Re: [PHP-DEV] Re: Named arguments revisited

2006-01-12 Thread Ilia Alshanetsky
Aidan Lister wrote: > As useful functions tend to increase in complexity over time, often so > does the number of parameters. > > It soon gets to the point where function calls look like: > foo(true, false, false, false, false, true) > The rest of the parameters being required to be supplied, with

RE: [PHP-DEV] Re: Named arguments revisited

2006-01-12 Thread Jared Williams
> Andrei Zmievski wrote: > > On Jan 9, 2006, at 4:09 AM, Aidan Lister wrote: > > > >> As useful functions tend to increase in complexity over > time, often > >> so does the number of parameters. > >> > >> It soon gets to the point where function calls look like: > >> foo(true, false, false, fa

Re: [PHP-DEV] Re: Named arguments revisited

2006-01-12 Thread Christian Schneider
Jason Garber wrote: Here is a coding idea for you, in case you hadn't considered it... function highlight($text=NULL, $needle=NULL, $strip_links=NULL, ...) { is_null($text) && $text = SOME DEFAULT VALUE; is_null($needle) && $text = SOME DEFAULT VALUE; is_null($strip_links) &

Re: [PHP-DEV] Re: Named arguments revisited

2006-01-12 Thread Michael Walter
On 1/12/06, Robert Cummings <[EMAIL PROTECTED]> wrote: > On Thu, 2006-01-12 at 01:25, Jason Garber wrote: > > Hello Aidan, > > > > I think named parameters would be a useful feature... I'll leave it > > at that. > > > > Here is a coding idea for you, in case you hadn't considered it... > > >

Re: [PHP-DEV] Re: Named arguments revisited

2006-01-12 Thread Robert Cummings
On Thu, 2006-01-12 at 01:25, Jason Garber wrote: > Hello Aidan, > > I think named parameters would be a useful feature... I'll leave it > at that. > > Here is a coding idea for you, in case you hadn't considered it... > > function highlight($text=NULL, $needle=NULL, $strip_links=NULL, .