Zumwalt says "To replace his former PHP atrocity."
After*Image says "No other result is possible in PHP."
Zumwalt says "Heh. I see you have PHP experience."
After*Image says "Yes. It was extremely painful."
After*Image says "And that was before I tried to do functional programming (even though PHP lacks anonymous functions)."
Pi LAUGHS. A*I, check out what they added recently: http://www.php.net/create_function
After*Image says "Pi, that's not recent. And that's what I used. It's basically a glorified eval."
Zumwalt blinks. "It gives it a unique name? That's not anonymous, that's just broken."
Pi points at that. "Notice how it's not a closure and not an anonymous function? Yet they have the gall to call it 'similar to lambda'"
After*Image says "The problem is it creates new *named* functions. Unlike anonymous functions, they don't get garbage-collected."
Zumwalt says "Does PHP have any types other than string?"
After*Image says "And yeah, they're not closures."
Pi says "It's got bool, which decays to string irregularly."
Pi ohs. The PHP devs don't care about garbage collection -- they're of the mindset that gc happens on exit().
After*Image says "They have arrays which try to be both numerically indexed and associative."
Zumwalt says "Gah."
After*Image says "Not only does PHP have to keep compiling the function over and over in a loop (unlike Perl which does it once, having closures), each created function is a new object. I segfaulted apache before giving up."
After*Image says "Implementing stuff like compose() and bind() are even worse."
Pi mumbles some choice phrases about PHP
Pi says "I think the phrase 'limp-dicked shitpile' came up once."
After*Image says "The result of Create_Function() is a unique function name. It's guaranteed to be unique from anything you wrote because it has a NUL character in it, which you can't write because the parser barfs on NUL."
Zumwalt says "Your complaint about them not being garbage-collected...that wouldn't be a complaint unless some PHP scripts are long-running, am I right?"
Zumwalt says "But of course some are long-running."
After*Image says "Which means that you can't eval a code segment containing that function's name."
Pi whoas, A*I. I thought it was generated in a similar manner to (gentemp) in Lisp, ie introspect and increment a counter..
Zumwalt says "Gah!!"
Pi says "But that would be rational."
After*Image says "It does increment a counter. But it contains a NUL too."
Zumwalt says "It would have to increment a counter, else you could only use it once."
After*Image says "So, to create a function which calls a created function, instead of generating a string of code which contains the created function's name, you have to substitute an expression which at runtime evaluates to the function's name."
Zumwalt can hardly wait to use his new Power Phrase: 'limp-dicked shitpile'
After*Image says "I've resolved not to ever install PHP (and therefore not to use any PHP apps) on any system I control."
Zumwalt reads more about create_function. "The comments are amusing."
Pi says "Yeah. A language whose documentation requires that users correct it on a live basis."
Zumwalt throws up a LOT in his mouth.
After*Image says "The PHP developer community is by itself sufficient reason to avoid it."
Zumwalt chortles at this comment: 'There is almost always an alternative solution to self modifying code.'
Zumwalt says "Gosh, takes me back to the 1970s!"
Pi is reminded of a quote: PHP is a minor evil perpetrated and created by incompetent amateurs, whereas Perl is a great and insidious evil, perpetrated by skilled but perverted professionals. - Jon Ribbens
After*Image says "It got better..."
Zumwalt says "'You can't refer to a class variable from an anonymous function inside a class method using $this. Anonymous functions don't inherit the method scope. You'll have to do this:' (horrible kluge follows)"
Zumwalt has to stop reading this comment thread in hopes of keeping his incipient dinner down.
After*Image says "I never actually worked with any PHP frameworks. Just the root of evil itself."
Zumwalt says "The Bible talks about building on sand."
After*Image says "Apt."
Pi says "PHP Shambleworks, more like."
After*Image says "Yeah, 'frame' is too solid-sounding for this purpose."