Re: Named arguments revisited
| From: | Jared White | Date: | Thu, 01 Dec 2005 19:35:16 +0000 |
| Subject: | Re: Named arguments revisited | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-20976@lists.php.net to get a copy of this message | ||
On Dec 1, 2005, at 11:16 AM, Sebastian Kugler wrote:
On 12/1/05, Jared White <jared@intuitivefuture.com> wrote:Hmm, that's not such a crazy idea. :) Wait, hey, that's not fair! Now you've spoiled everything! :) Seriously though, it still doesn't address the fact that the function/method definition itself needs to have the named parameter notation to match, plus the idea of the catch-all parameters (from func_get_args() presumably) having string keys (I think that's what Christian mentioned which is a cool Python feature). JaredI still say its main selling point is that the calling code is its own API documentation.why don't you just write something like cycle(/* name: */ "myCycle", /* values: */ "#eeeeee;#d0d0d0", /* print: */ false, /* reset: */ true, /* delimiter: */ ";"); It's just as self-explanatory and you don't have to change the language for it :-)