5 ms·
Tell me what should "the industry" be using to be modernized? And, more importantly, why?
by melicerte 10y ago
Tell me what should "the industry" be using to be modernized? And, more importantly, why?
- wyqydsyq 10y agoA language with some consistency would be a start. Go, TypeScript, Elixir are all superior to PHP in that aspect. PHP lacks consistency in naming conventions, function signatures (is that a string or bitmask I'm supposed to pass?) and tons of other things. I could write a novel about it, but there's already multiple websites/articles dedicated to PHP's inherent design flaws: http://phpsadness.com/ http://phpsadness.com/ https://whydoesitsuck.com/why-does-php-suck/ https://whydoesitsuck.com/why-does-php-suck/ 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/ Plus it's limited in capabilities compared to stuff like Node.js (or other libuv bindings), considering we get stuff like Hot Module Reloading, isomorphic/universal applications, simple websockets integration, all of which PHP is either incapable of providing or provides inferior solutions due to limitations of the PHP language or Zend Engine.
- pcnc 10y ago> PHP lacks consistency in naming conventions, function signatures (is that a string or bitmask I'm supposed to pass?) and tons of other things. Welcome to Javascript?
- Scarbutt 10y agoPHP is still very web focused (server side), Javascript is a much better general purpose language, with more domains where it can be used and IMO a way much better language than PHP.
- chriswarbo 10y agoI agree that JS is a better general-purpose language than PHP, but it's still about as "Web focused" as PHP. As far as general-purpose scripting languages go, it seems like Python has been the go-to choice in a whole bunch of domains for a couple of decades, for example: - Unix scripting (the reason it's part of almost every distro's base install; I think even OSX includes Python) - Desktop GUIs (GTK, wxWindows, tk, etc.) - Non-Web, performance-insensitive games (i.e. pygame); these have always been outnumbered by Web games though, mostly with Flash and recently some with Javascript/HTML5. - Scientific computing and data analysis (numpy, scipy, pandas, etc.); R, MATLAB, etc. are big too, but I wouldn't call them general-purpose. About five years ago, I would occasionally run across some non-Web thing written in Ruby; i.e. I would find a CLI program which claimed to solve whatever problem I was tackling, then after about an hour battling with rubygems I'd rage quit and move on. Within the past couple of years I've noticed a trend that these sorts of projects now tend to be written in Javascript, and its npm which makes me nope out after an hour. Still, those have only been a tiny proportion of the applications I run across, so I certainly wouldn't recommend Javascript (or Ruby) as a general purpose language for publically distributed, non-Web applications, since a) their installation mechanisms don't seem battle-tested enough and b) very few people seem to be using them in that way. If we're pulling alternatives out of a hat, I'd say that extrapolating the line from PHP to JS (i.e. more consistency, less bloat, fewer spandrels, safer by default, etc.) we'd reach Racket.
- nnq 10y ago> A language with some consistency would be a start. Your forget what species you're talking with here, and the language you're using to communicate right now :) When has Homo Sapiens ever exerted consistency in language design?! - really, programming languages are more like tools for communication that tools for solving technical problems, and they exhibit all the flaws that you see in other communication tools made by humans...
- girvo 10y agoNot that this will ever change your mind, but there are excellent libev and experiment libuv bindings for PHP. Using ReactPHP (no relation) or Icicle allows for high performance asynchronous event loops. Just an interesting tidbit.