3 ms·
Your second statements communicates to me that you like it because it's a toy language. It may be useful for just getting something small done and getting start
by zaphar 15y ago
Your second statements communicates to me that you like it because it's a toy language. It may be useful for just getting something small done and getting started but for someone who looks at programming as an enjoyable craft php loses it's shine. Especially once you've been exposed to other languages that highlight how much better it could be.
- EGreg 15y agoI actually disagree to some extent. I know, it's PHP. But it can do some pretty amazing things if you think in terms of files. If you're coming from a C background, it's actually quite nice. For example, you can use include ( ) in so many ways, autoload classes, write getters/setters and override anything, implement views, etc. Everything "just runs", or can be compiled into fast code with HipHop (or cached with APC). OK, to be fair, I would say that PHP with a framework that takes advantage of it can be very cool. I can't exactly share our codebase, but you can see the open source version from 2 years ago : http://phponpie.com http://phponpie.com to aprpeciate some of the "beauty" of PHP And it can be extremely expressive and powerful. Sure, it can't do everything that Node.js can do, but for serving requests it can be awesome. It isolates every script in its own memory space, so you never have to worry about anything! The one thing I do not like about PHP is that it's married to the outdated thread-based webserver model, while the new boys on the block (NGinX, Node.js and the new Apache) all use event-based programming. Don't downvote just because I said PHP can be cool. Look at our framework at least, before voting :)
- zaphar 15y agoActually I upvoted you. Just because I dislike PHP doesn't mean someone else can't like it.
- esrauch 15y agoFacebook uses a lot of PHP and seems to do fine, just because a language allows you to write horrible code doesn't necessarily mean it can't be used to write good code. PHP obviously has a lot of warts, but I think the bigger problem is that it gives you just enough rope to hang yourself.
- Darmani 15y agoThere are two kinds of programmers at Facebook: The ones who curse PHP every work day, and the ones who don't use it. "This language really sucks." -- paraphrased, intro to PHP on Facebook's internal Wiki
- esrauch 15y agoI wouldn't be surprised if it happened more than usual with PHP, but in my experience programmers always curse the language/framework/api that they use heavily. You always learn the seams and hit issues with the design if you work with something for long enough.
- zaphar 15y agoYep, It's a phenomenon frequently called "using in anger". The interesting thing about php is you don't have to use it very long before you use it in anger. Most of the time you can tell if someone is well versed in a language if they use it in anger. With PHP all you can tell is they've used it.
- prodigal_erik 15y agoIs that was "use in anger" means? I had assumed it came from "fire a shot in anger", meaning serious use rather than practice or ceremony. It's true that most software makes me either angry or sad, but PHP (where even "==" is wrong after Perl had gotten it right) was a singularly memorable peek into Special Hell.
- IgorPartola 15y agoNope! I love me some Python, JavaScript, C, and even ActionScrip, Java and Pascal. Blaming the tools is bad form unless you can prove they are bad, which can be done with PHP.
- direllama 15y agoThe concept of "bad" is subjective and can't be proven. Don't blame the tools for what the people do with them.
- handzhiev 15y agoWhat is the definition of "something small"? Millions of users and companies use PHP based software for various business needs, from small to big. Yes, the language has a lot of flaws, but I disagree that you can't create useful and rather "big" software with it. And it's easier compared to other languages. If it solves people problems, why not?
- zaphar 15y agoNothing I said was meant to indicate you couldn't use php for something big. All I meant to indicate was that once you've seen what other languages have to offer and have started to look on programming as a craft php starts to lose it's shine.
- nocipher 15y agoI spend a lot of my time writing Python, especially for Django powered sites, and writing client side javascript. Periodically, I'll get stuck maintaining large projects written entirely in PHP and miss the nice features from other languages. Javascript has its bug-a-boos, but with its dynamic design and jQuery, its easy to write clean code. Python is also much cleaner and usually just works. On the other hand, all of my programming horror stories and terrible hacks have been written in PHP. I remember having to use an older version of PHP that failed to support closures when it was needed in some legacy code. The code was passing functions as arguments, but because the functions were not bound in the local scope, there were issues with namespace collisions. I had to resort to global variables for a situation that should not have needed it because rewriting everything properly required a non-trivial refactoring that I did not have the time to complete. Granted, this has been addressed in more recent versions of PHP, but there are always old versions floating around where "gotcha's" like this show up. More recently, I ran into an issue porting PHP 5 code across different linux distributions where, for some strange reason, libraries on the include path failed to be found. Debugging something like that is ridiculously frustrating. Problems like this are bound to show up with any technology you use frequently, but my work involves using many languages and technologies and, of them, PHP is the only one that leads to these sorts of problems with such regularity.