3 ms·
But genuine question -- what other languages are as simultaneously as useful AND predictable?
by jrm4 4y ago
But genuine question -- what other languages are as simultaneously as useful AND predictable?
- jfabre 4y agoruby...
- lmm 4y agoPython covers many of the same use cases and is much more consistent/predictable. TCL if you want to go back a bit further.
- _0w8t 4y agoWith Python one never knows when a particular feature code depends on will be removed. With PHP code written 15 years ago still works.
- winstonewert 4y agoWhat features have been removed from Python?
- eyegor 4y agoBesides the obvious 2 to 3 transition, cpython has obsoleted or renamed stdlib modules several times between 3.x versions. For example, the collections.abc change causes several common Linux bits to break if you change the system default to 3.8.
- Hasu 4y ago> With PHP code written 15 years ago still works. If you never upgrade, sure. PHP 7 and each minor version in it have deprecated and removed plenty of stuff that was legal in 5.6. PHP 8 is on track to do more of the same. I think the backwards incompatible changes are pretty much all good for the language, but claiming backwards compatibility in PHP is completely wrong. If you aren't on PHP 8, you aren't supported, and if you're on anything earlier than 7.4, you aren't getting security releases. And the new versions released yearly all have breaking changes, and get three years of security support. It's not 2015 anymore.
- SketchySeaBeast 4y agoWhich is a double edged sword. How many ways can one escape a string, and for how many of them will you find a stack overflow comment from a decade ago saying are the secure option to use?
- oneeyedpigeon 4y agoI've never experienced the same kind of out-of-the-box problems with PHP as I have Python. I seem to suffer constantly from python/python3, pip inconsistencies and stuff just breaking constantly.
- lmm 4y agoPython build/package management tooling is a joke, but Python the language is very consistent and usable.
- Hasu 4y agoRuby, Python, C#, Java, and JavaScript are all are more predictable and just as useful. Go, Elixir, Clojure, and probably others are more predictable while being less "useful" only in the sense that they may have less convenient deployments or less mature web libraries.
- mxschumacher 4y agoGo is more difficult to deploy than php? php.ini files and php extension installations to get to production is what I remember
- Hasu 4y agoNo, I was thinking 'less mature web libraries' for Go. It's hard to talk about groups of languages in broad strokes when there are various tradeoffs and each language has its own strengths and weaknesses, and I painted two possible weaknesses broadly across several languages that don't strictly apply to all of them.
- tisc 4y agoI've used Python, C#, Java, JavaScript and PHP, and in my experience Python is the most unpredictable of these languages. Just to name a few: - mutable default arguments - late binding closures - typings that are purely documentation instead of being enforced Labeling these things as "gotchas" doesn't make them predictable imo.
- zelphirkalt 4y agoPython less predictable than PHP? In what world? In PHP standard library functions silently take a null instead of a string, even though they are string handling functions, hiding that mistake for the user of the language, until a later point in time, when the context has been lost and one needs to do silly debugging, until one finds the place where the null first was handled, while it should have raised an error. Such is the silly character of PHP standard library. Many functions also have multiple return types, which makes it difficult to simply use the result of one as input to another. If predictability means to predict, that standard library will behave nonsensically, then yes, PHP has the one high predictability.