Re: lambda() naming
| From: | Zeev Suraski | Date: | Mon, 05 Jun 2000 05:59:09 +0000 |
| Subject: | Re: lambda() naming | ||
| References: | 1 2 3 4 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-20228@lists.php.net to get a copy of this message | ||
At 02:36 05/06/2000, Chuck Adams wrote:
I would only go for lambda() if it acted like most other languages treated lambda, and that's if it was a *form*, as in it parsed specially. e.g. lambda($x, $y: print ">>> debug: comparing $x vs. $y"; $x > $y) Otherwise you may as well call it "string_to_function". Actually, i'd like function() myself. Makes perfect sense, you either assign a name to function, or you give it a body and no name. Would definitely add extra hair to the parser in that case tho.I don't see the need to make parser-level modifications in Zend for such a relatively rarely-used feature. I always prefer implementing functionality as regular functions - much more maintainable, and many less places you can go wrong. The idea of having special notation for lambda() with specialized scanning/parsing sounds like the most horrible one so far to me (no offense :) That's exactly what we don't need - yet another syntax introduction that has nothing to do with PHP. Zeev -- Zeev Suraski <zeev@zend.com> http://www.zend.com/