3 ms·
It's kind of funny that people see PHP related to anything other than serving websites and they cringe. As of 5.3 (and I won't say prior to that because even I
by mcs 16y ago
It's kind of funny that people see PHP related to anything other than serving websites and they cringe.
As of 5.3 (and I won't say prior to that because even I don't believe it), PHP has become a nice utility language for just more than serving out wordpress.
Closures and the reference sweep GC level the playing field.
- robryan 16y agoYeah, this code actually really illustrates the difference between writing crappy code in PHP and writing something elegantly using everything the has come in in the past few versions. I have seen quiet a few PHP bashing comments recently that while true of older versions are much less true of 5.3, I mean there is still the same old nitpicks about the parameter orders and the amount of built in functions in the standard namespace but it is defiantly heading in the right direction.
- cageface 16y agoWhat features specifically have made the difference? I've tried a few times to buckle down and learn PHP and I never seem to get farther than the mixed value/reference semantics, which I remember highly unfondly from my perl days.
- jimbokun 16y agoI just finished reading "Javascript the Good Parts" recently. It's probably also the case for PHP that if you pretend that certain parts of the language just don't exist, you end up with a pretty good language. (I have never programmed anything in PHP.) Building a Lisp on top of PHP strikes me as a vehicle for helping developers to adhere to the "good parts." I'm not sure whether that was the intent here, but it could turn out to be a useful side effect. A note on the language itself: It appears that you can choose any set of matching braces that you want anywhere in your program. I think this is the convention Scheme uses. Common Lisp reserves braces other than () for reader macros. I personally, however, favor Clojure's approach of defining distinct behavior for each brace type. There are only three pairs of matched characters on the keyboard. It seems to me that this makes them too valuable to not leverage them as a core part of the language. Immediately knowing the meaning of a specific brace type makes it much easier to read someone else's code.
- gtani 16y agohttp://www.amazon.com/PHP-Good-Parts-Delivering-Best/dp/0596804377/ http://www.amazon.com/PHP-Good-Parts-Delivering-Best/dp/0596...
- jacquesm 16y agoPHP has made me more $ than all the other 'good' languages that I've ever worked with combined. And that was before 5.3. An embedded lisp, even a slow and imperfect one is a nice stepping stone to have though. It takes away two thirds of the trouble you have to go through when starting with a new language, environment and libraries.