4 ms·
Even ignoring the innumerable flaws PHP (yes including 7) has as a language, its standard library is among the worst standard libraries of any language.
by milesrout 10y ago
Even ignoring the innumerable flaws PHP (yes including 7) has as a language, its standard library is among the worst standard libraries of any language.
- qaq 10y agoEverything has flaws but PHP is a reasonable choice for many problems. Python pip is crap compared to composer for example. While my favorite language is Elixir I mostly do Node and Python at work can't say experience is significantly better with either of them compared to PHP 7.
- milesrout 10y ago>Everything has flaws False equivalence. PHP has many, many more flaws to a much deeper and more serious level than any other mainstream programming language. It's insecure, buggy, full of broken behaviour for legacy systems, slow and easy to misuse. Its standard library is inconsistent, hard to learn, easy to misuse, full of legacy behaviour and slow. >but PHP is a reasonable choice for many problems. PHP is an unreasonable choice for every problem unless you have already solved your problem with PHP. I'm not saying that Facebook should rewrite in something else, obviously, but nobody should be starting new work in PHP. Nobody. >Python pip is crap compared to composer for example. There's nothing at all wrong with it. >While my favorite language is Elixir I mostly do Node and Python at work can't say experience is significantly better with either of them compared to PHP 7. Well you're quite objectively wrong. Yes Node.js is a pile of shit comparable to PHP, but it's Javascript, what do you expect? Javascript is basically the second worst mainstream programming language right behind PHP. Yes they've both had superficial changes that make them more enjoyable to write recently, but none of those changes fix the underlying inherent problems with those languages. Python, on the other hand, is a well-built, well-designed, much more sane language.
- qaq 10y agoOK here's a list of things I miss from PHP when doing large projects in Python. 1) Much better typing support 2) interfaces 3) visibility control 4) composer As far as none would choose it for new project don't know if you ever heard of this company called Slack they chose PHP fairly recently and seem to be doing OK.
- weixiyen 10y agoNot trying to argue about languages, but Slack is not a good example of a great technical product - backend wise. It's bloated, slow, can't support cases with too many users, and makes way too many requests just to initialize.
- zapt02 10y agoWhen did you last write a project in PHP? Your thoughtsmight have been valid ten years ago, but they aren't now. fwiw, I find the PHP stdlib more complete than many other languages.
- pbreit 10y agoWhen you have that sort of attitude about 2 of the most widely used languages/platforms in existence, I think it's more a reflection on you.
- im3w1l 10y agoWell he does like python which is above them both in popularity.
- wanderr 10y agobesides haystack, needle vs needle, haystack, what do you view as so bad about PHP's standard library? The main critique I've heard is that it's so big, but it's hard to see that as a downside unless you're a maintainer of the language itself. To me it's great to have all this stuff built in, you very rarely need to add in dependencies, and besides fewer dependencies being better in general, it also means you can get started faster, you don't have to spend so much time figuring out what's the popular library for solving x, and is it still maintained, and was it built with a bunch of other weird dependencies? You just search the docs, find what you need, make note of what you need, issues, examples, etc., and you're off to the races.