Page 2 of 2
Posted: Tue Dec 04, 2007 9:22 pm
by volka
JellyFish wrote:In a way yes. But the create_function doesn't appear to be very..."good". Not like javascript which uses, I guess you say, closure or lambda style programming.
CAn you give an example of a "more lambda style" javascript approach?
Posted: Tue Dec 04, 2007 9:50 pm
by RobertPaul
Yeah ... you want closures. PHP doesn't have closures.
It's been emulated ... but it all seems a bit hackish.
Posted: Tue Dec 04, 2007 9:52 pm
by feyd
I've pretty much always felt that if you need closures (in the sense desired) you have a code smell. The smell is equal to that of using
eval() in my book.
Posted: Wed Dec 05, 2007 5:53 am
by volka
Only if imperative languages treat functions as second class citizens.