4 ms·
I find PHP better than I thought I would because it supports a style of programming that's very similar to Java, but the big problem is that PHP developers ofte
by emodendroket 8y ago
I find PHP better than I thought I would because it supports a style of programming that's very similar to Java, but the big problem is that PHP developers often tend to have more of a "quick-and-dirty" mindset and don't really appreciate that kind of code.
- drivingmenuts 8y agoAs a PHP programmer, among other things, I think Perl programmers have the ultimate "quick and dirty" mindset, but they're typically trying to solve different problems from a different perspective. I also think a lot of the bitching about PHP is mostly because newer programmers are just repeating what they heard with the fervor of someone who doesn't work in PHP regularly. Does it have problems? OH HELL YES. So does every language. Are the problems ever going to be fixed? OH HELL MAYBE. Is it the perfect hammer for every nail? OH HELL NO. I work with what I know and I live with the problems because that's what I know. If I need new features, I'll work in another language, maybe. No language is without issues. Except Python. Python is perfect.
- maxpup979 8y agoIs that python 2.x or 3.x that is perfect? GRIN well put BTW
- drivingmenuts 8y agoPython 3. Python 2 is only going to be around for another 20 years or so.
- emodendroket 8y agoYeah, don't get me wrong, PHP is much better than I expected it to be and my problems were more social than technical.
- exceptione 8y agoPython is surely nice looking, but as it allows redefinition of everything at runtime, it is impossible to optimize at compile time. I think PHP, with the recent type strictness functionality, is better positioned for making way to new developments like meaningfull code analysis, (compile time) optimizations and performant JIT compilers. Python is too dynamic for that, unfortunately. The same holds for JavaScript.
- emodendroket 8y agoPhpStorm with the Symfony plugin is already excellent for code analysis if you're working in Symfony
- dreammaker 8y agoPHP supports almost any style of programming depending on the framework you choose. And that's sometimes a problem and as a consequence is 'that PHP developers often tend to have more of a "quick-and-dirty" mindset and don't really appreciate that kind of code'. I guess you have tried Symfony, haven't you?
- emodendroket 8y agoI tried Symfony, which I liked a lot, and I wrote code in a similar way as I would have for ASP.NET, which I thought seemed logical considering how similar they were. And then my colleagues complained that my code was too complicated and they didn't like all the type declarations when you could just easily return untyped arrays everywhere. I don't work in PHP anymore.
- ibejoeb 8y agoExactly. It's possible to write good PHP, but how much of that do you see in the wild? PHP really baits people into making very fragile software. It's very hard to write good PHP. It's hard to write good C, too, so rather than frame it as an attack, realize that it's a long rope with which one can hang himself.
- emodendroket 8y agoI think if you pick a sensible framework it's not especially hard to write sensible code (except it's hard to reason about the performance of PHP's associative arrays), but the older culture is hard to root out.
- bdcravens 8y agoThe same could be said of many scripting languages when frameworks have less influence. Had Rails not come along, and most Ruby apps were just files fronted by Rack, you'd see the same thing. ColdFusion has a reputation for being junk code, but that's because many apps are a bucket of files, and clean frameworks like ColdBox aren't nearly as dominant.
- emodendroket 8y agoTrue enough. What I liked about PHP7 was that, optionally, you could have most of the rigor (and sophisticated IDE help) of non-scripting languages (although with a painful amount of boilerplate and some weird quirks).