4 ms·
Thanks for sharing. The thing that I am most concerned about with PHP is not, strictly speaking, the language itself. The syntax is slightly odd but otherwise f
by johnday 7y ago
Thanks for sharing. The thing that I am most concerned about with PHP is not, strictly speaking, the language itself. The syntax is slightly odd but otherwise fine. And the semantics are much the same as any similar language.
The real problem that I find with PHP is that the designers seem (from an outside perspective) to take a similar approach towards language backward-compatibility that, for example, C/C++ have. There is some rejection of the idea of getting rid of the old, bad stuff. Plenty of new, cool features is all well and good - but there are still holes in the floor that new learners will fall through.
[To clarify, I understand the case made by the C/C++ committees on supporting old code. But nobody's programming pacemakers in PHP, one would hope.]
- jbrooksuk 7y agoI heavily agree with this. The standard library, whilst great, has so many inconsistencies which I wish they'd fix and standardise.
- gog 7y agoThe amount of legacy applications being run on the internet is huge. Breaking stuff would put a great financial burden on the companies running those. It is a sensible approach IMHO. What kind of bad stuff are you talking about? If you talk about function names and parameter ordering not being consistent that is not an issue for developers using the language daily, most of them are using an IDE so it doesn't matter as much as people who don't use it say.
- pdimitar 7y agoThose legacy applications won't ever be upgraded to that theoretical and slimmed down PHP anyway, so I don't see a problem.
- simion314 7y agoOld PHP projects can be upgraded in the present because backwards compatibility exists, as i metnioend in other comment I done such a small upgrade and I hat to change only 1 deprecated function with a different one. If this would not have been possible the project would have still be running on an old version without security fixes and slower(eating more electricity so bad for environment)
- pdimitar 7y agoIf you say so. ~5 years ago I had to work a full week, 8h a day, to fully upgrade a medium-sized website from PHP 5.2 to 5.4, and eventually gave up. Most of the time was spent trying to cope with different datetime parsing idiosyncrasies.
- simion314 7y agoI am sorry you had such a bad experience, can I ask you to give me some link or details about your issues with datetime , I want to learn about the problems I do not doubt you. I had some problems with mysql updates though, new versions had different)better default behavior). we were using an ORM for the project but the initial setup and migrations were made in plain SQL and those needed to be updated. As an example in older mysql you could have a timestamp column NULL with no default value set and now we needed to fix to set a curenttime as default.
- johnday 7y ago> If you talk about function names and parameter ordering not being consistent that is not an issue for developers using the language daily It does feel like this is analogous to saying "the holes in the floor of our building aren't an issue - all the senior devs know where they are by now"
- Lazare 7y agoI think that is largely changing. Quite a lot of breaking changes to clean up ancient cruft are slated for 8.0. For example, PHP has infamously had broken ternaries (they're left associative, which is never what you want, not how any other language works, and a rich source of bugs). Nested ternaries are being deprecated and will be removed completely in 8.0; in a future version correct (right associative) behaviour will be able to be added. Obviously there's a long road to go, but being willing to change how an operator works on that level demonstrates a willingness to break compatibility when necessary.
- return1 7y agoYes, that is the reason why i chose to write stuff in it (also because i knew it relatively well). PHP has not been fancy for 15 years now , which is a good thing if you have more interesting things to do rather than refactoring your old websites because some college kids wanted to "move fast and break things that work". If PHP decides to go with major breaking changes, i will probably quit it.