[Haskell-cafe] Re: Lambda and closures in PHP -- could someone please comment?

Loup Vaillant loup.vaillant at gmail.com
Tue Jun 17 19:11:30 EDT 2008


2008/6/17 Achim Schneider <barsoap at web.de>:
> PR Stanley <prstanley at ntlworld.com> wrote:
>
>> Blimey! Talk about rearranging the deckchairs :-)
>> With respect, do you not think it'd be wiser for the community to
>> deal with a total lack of proper type checking, the lack of any
>> notion of the general concept of a function, or a whole range of
>> other fundamental issues in PHP first before worrying about closures
>> and lambda functions?  I'm no language purist but PHP really does
>> take the biscuit.
>> My personal views and not in any way representing the list .
>>
> Oh yes they are. I'd rather smash my head repeatedly into a wall than
> suffering the agony of using a hacked cat.

Well, it's not like they're going to turn python into Haskell :-) If
any flaw in a language is fundamental, fixing it is likely to cause
compatibility... issues.

And about closures done wrong, I think the biggest mistake (the only I
spotted, actually) is the keyword "lexical". It seems to add
unnecessary verbosity where plain lexical scope would suffice. It
would be OK if lexical scope is impossible (which I doubt), and plain
wrong if done for readability reasons. Is there any discussion about
this point? Concerning OOP, I didn't really pay attention.

My 2 cents. Take with a grain of salt, for I don't really know PHP
Loup


More information about the Haskell-Cafe mailing list