5 ms·
I'm as cutting edge in the PHP community as any is going to be (having used the latest betas & community-best-practices since 2004). I still have serious doubt
by mjburgess 13y ago
I'm as cutting edge in the PHP community as any is going to be (having used the latest betas & community-best-practices since 2004).
I still have serious doubts about PHP, and always insist to new developers should learn a (ruby/python/... clojure/...) too.
The main problem with PHP is the language itself. There is no paradigm it does well. If you're into class-ical OO, then the language's type system is a joke (esp. with the lack of co/contra-variance in type hinting).
If you're into dynamic OO, PHP's java leg-humping perpetually gets in the way. There is no meta-classes, monkey patching, etc. everything that should be dynamic is static.
If you wanting functional programming... you have nothing. Literally. The best they've been able to do is a half-baked closure system. Half the library uses references (rather than returning meaningful data) so you cannot compose functions and there is no hope for any kind of collections system (lists, arrays, etc.) that support a typical functional manipulation.
All you're left with is a "dynamic C".
Add to this that PHP is designed to terminate immediately... and you're modern "daemonic" web requirements (concurrency, queuing, etc.) are completely out of the window.
From the point-of-view of "web-scale" application development PHP is a broken toy: both in the sense that talented developers are hampered by it, and in the sense that its execution model is ill suited to the problem.
- alien3d 13y agoJava->queuing->Just put sleep.. why so so hard ? with the lack of co/contra-variance in type hinting Write proper code oop and comment->Most latest ide can see it. Now php much okay with namespace.. only what i really wanted now is partial class.. Other no need..
- hrvbr 13y agoPlus there is PHP's aesthetics. I can't help but see all PHP code visually unpleasing. Programming isn't just a technical task. It's also an art like writing novels. I'm not satisfied when the code I produce doesn't look pretty, independently from the algorithm. In the article here, the Ruby code looks much cleaner to me than the PHP version, even though it's technically the same. Aesthetics is the main reason why I switched from PHP (that I learned in class) to C# (that I learned on my own).
- memla 13y agoThat really depends on what you're writing and how you are doing it. How is this php[1] code uglier than this python[2] code? [1]: https://github.com/laravel/framework/blob/master/src/Illuminate/Config/Repository.php https://github.com/laravel/framework/blob/master/src/Illumin... [2]: https://github.com/reddit/reddit/blob/master/r2/r2/controllers/wiki.py https://github.com/reddit/reddit/blob/master/r2/r2/controlle...
- alien3d 13y agoseem php shorter without comment. while see the python.. quite nasty import from.. i tough python is simple .
- mehwoot 13y agoI'm not saying it really matters, but the PHP just looks ugly to me. I think it's all the dollar signs and braces.
- jacquesm 13y agoThat's a mirror image of 'Lisp just looks ugly to me. I think it's all the parentheses.'. There is a lot more to a language than its syntax.
- PommeDeTerre 13y agoSyntax is highly important, however. A poor syntax can make an otherwise decent language quite unbearable. A nice syntax doesn't make an otherwise poor language good, either.
- coldtea 13y agoThat's extremely shortsighted. Special chars, like PHP $, Rust's ~, Ruby's @, help the programmer tell things apart easily. Vastly better than having to keep the information in your mind after the declaration -- and much lighter and better than full-on hungarian notation madness. As for the braces, they never went out of style. In fact, with the exception of Python, the languages that don't use them are not that popular, compared to the ones that do. Coffescript, for example, is insignificant compared to the plain Javascript use.