6 ms·
Wait, people still use PHP for new software?! And here I was thinking the industry had modernized...
by wyqydsyq 10y ago
Wait, people still use PHP for new software?! And here I was thinking the industry had modernized...
- yo-code-sucks 10y agoActually PHP is an amazing language that is almost impossible to write bad code in...............NOT!
- melicerte 10y agoTell 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.
- NameNickHN 10y agoPHP is actively being developed with ton of new features added. It has a lively framework landscape with new versions released all the time. You can't get more modern than that.
- wuezz 10y agoIndeed, PHP is part of that industry. Some parts of the PHP eco-system are even leading the way, believe it or not. Laravel is the best example for this, with spin-offs in several other languages. (Fair notice: many of the ideas in Laravel are not new, but borrowed/inspired from C#, rails and others) * Node.js frameworks inspired by Laravel: http://www.adonisjs.com/ http://www.adonisjs.com/, https://quorrajs.org/ https://quorrajs.org/ * Python: http://www.pylonsproject.org/projects/pyramid/about http://www.pylonsproject.org/projects/pyramid/about, https://github.com/aacanakin/glim https://github.com/aacanakin/glim * Java: http://wings.loonydev.com/ http://wings.loonydev.com/ and so on In other news, the `trait` type was recently popularized by PHP and can now be found in many languages: https://en.wikipedia.org/wiki/Trait_(computer_programming) https://en.wikipedia.org/wiki/Trait_(computer_programming)
- tasuki 10y agoI doubt traits were "popularized" by PHP. PHP 5.4 was released in 2012, when most of the other listed languages had traits already.
- wuezz 10y agothose other languages weren't popular. hence "popularized"
- davidwtbuxton 10y agoWhat does Pyramid borrow from Laravel? I thought it grew from repoze, which was started a while before Laravel.
- 10y ago