Re: lambda()
| From: | Mark Melvin | Date: | Mon, 05 Jun 2000 09:20:42 +0000 |
| Subject: | Re: lambda() | ||
| References: | 1 2 3 4 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-20235@lists.php.net to get a copy of this message | ||
----- Original Message -----
From: "Chuck Adams" <scrytch@uswest.net>
> 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.
>
> chuck "rose.x->Y.x ... a rose is a rose is a rose is a ..." adams
Okay, you guys seem to dislike lambda alot :)
I like function() too, but function is already a reserved word. Well, I
won't dispute the name anymore, whatever.
I still have some questions :
What is the type of the resulting function ?
Can it be assigned to a variable or an array ?
Can it be saved and stored in a database ?
Can it be used to execute user-supplied function (potentially harmful)?
You know, this lambda thing opens a lot of possibilities.
Mark Melvin
hylabs.com
--
"I wish they created LISP Machines instead of UNIX, so we don't have to
learn C"