7 ms·
There isn't a language that can replace php in 2021. Javascript doesn't have the size of build-in library. Golang is compiled and limited, blank spaces/tabs w
by ipaddr 5y ago
There isn't a language that can replace php in 2021. Javascript doesn't have the size of build-in library. Golang is compiled and limited, blank spaces/tabs will kill a Python program. Ruby /rails is slower. All are harder to host. What could you replace php with?
The tales of legacy mistakes holding back php are things with no basis in reality. What legacy mistake holds php back? Method names/parameter ordering?
When I started with php in 2001 those elite programmers at meetups were looking down at php because Java was cool. In 2003 those elite programmers thought php should die because asp took over. PHP kept going along quietly taking over the web until the facebook movie came out making PHP cool for a moment. Those elite programmers decided PHP was too mainstream and the why PHP sucked movement started. The elite guys moved to Ruby On Rails then node/MongoDB, angularjs, React, Nextjs leaving each ecosystem for the next hoping that one day they will strike gold.
- 0x0nyandesu 5y agoI've been working with php since 2001 and that whole time I've been cleaning up bad ruby and nodejs and PHP implementations and knowing JavaScript well enough to code in whatever front end nonsense comes out from PrototypeJS to jQuery to ExtJs to angular to react on and on ad nauseaum. Throughout PHP was my actual workhouse. It's kinda frustrating when I meet someone super into JavaScript as a backend because I still choose PHP even though I have 20 years of JavaScript under my belt and love Es2015+ promisable JavaScript. I'm not even really sure why python is so popular for DevOps cause I do everything in php and it's unit tested and works well with reproducible results.
- commanderkeen08 5y agoHonest question: what are people using if not PHP? Node? Python? The 80% of us who aren’t FAANG and are writing CRUD apps. I’ve tried researching the pros/cons and all I get are low quality listicles. Nobody can tell me why PHP is “bad” or what Python does that PHP can’t. Inconsistent params are the only argument I’ve heard. Which my IDE solves. What about JavaScript splice vs slice. I look it up every time.
- emodendroket 5y agoOut of date but this is the classic anti-PHP polemic. https://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-design/ https://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-design/
- ipaddr 5y agoIt was out of date when it was written.
- francislavoie 5y agoCan we _please_ stop posting that link, in 2021? It's very, very outdated.
- emodendroket 5y agoI warned it was outdated and it has a date. Nevertheless, it's a classic piece and a number of the criticisms are still true. I don't see what makes it any worse than linking to the Unix Hater's Handbook, which is also outdated in many respects and yet still considered a classic for a reason.
- nicce 5y agoStatistically PHP software has the most vulnerabilities. They are also quite different when compared to other languages. Language has many features which might be used unintentionally by programmer, leading for serious bugs. Not a good language to start with.
- ipaddr 5y agoWhat features are used unintentionally leading to serious bugs?
- emodendroket 5y agoThe ease of the "just put it on the filesystem and it can be run!" system also opens up security vulnerabilities when people want to enable file uploads, for instance. I think the proliferation of places you can put configuration for the runtime is also a potential source of issues, as are various forms of string escaping that should be avoided.
- nirui 5y ago> Javascript doesn't have the size of build-in library. Golang is compiled and limited, blank spaces/tabs will kill a Python program. Ruby /rails is slower. I have once heard an ancient prophecy (I think it's Greek) that says "Debating around PHP online summons the ghost of the dark behind your back" or something like that (I don't speak Greek, sorry). In the Client/Server world now days, the most of the time you only need one or two languages, one running on the Client side (JavaScript for example) and one running on the server (**, Go, Java, JavaScript etc). In that setting, JavaScript comes with the hard advantage of both-end compatibility, that gives you something like Server-side Rendering, which no other backend-only language could do, at least not "natively". If you have a foundation this good, people will build the library themselves when the language/runtime don't have it built-in. (the same is true when it comes to Swift/Dart/Kotlin. I bet there is someone/company out there writing both their app and their backend in Swift/Kotlin) For "backend-only" languages, it's largely down to personal/team preference. Some needs performance, some wants "write-friendly" (contains many factors). But the problem is, the market now days is saturated with better options that also do more things (often in a better way). When you bring all the options on the table, then suddenly that-language-the-name-we-shall-not-say started to look way less attractive. It's just that, comparison/competition kills things, no elite required.
- tored 5y agoIt exist multiple libraries/frameworks that allow you to write modern dynamic applications with server side rendering only, like Hotwire, Livewire, htmx and unpoly, thus the need to write a large amount of JavaScript for the frontend is no longer needed.
- lostfocus 5y ago> Server-side Rendering, which no other backend-only language could do Isn't it the definition of a "backend-only language" that it renders server-side?
- NateEag 5y agoI think they're referring to server-side rendering of SPA templates, which is something you get basically for free if your backend is written in NodeJS.
- oblio 5y ago> blank spaces/tabs will kill a Python program That's a lousy dig at Python. Stuff you solve with a free text editor and 15 seconds worth of configuration aren't real problems.