5 ms·
It’s not a question of age, and I think you’re comparing apples to oranges a bit. Cobol is simply kept running. Everything it does, newer languages do better.
by codeflo 6y ago
It’s not a question of age, and I think you’re comparing apples to oranges a bit.
Cobol is simply kept running. Everything it does, newer languages do better. Nobody writes new systems in it.
C++ on the other hand allows you to do things that other languages simply don’t, so of course it’s still alive. New C++ projects are started every day.
A lot of actively developed languages have their niche. Python looks very elegant to mathematicians and engineers, and has fast math libraries. Java has an unmatched ecosystem. And so on.
I think PHP's niche is low barrier to entry. Maybe I'm wrong, what do you think PHP does better than other languages?
(Edit: Sorry for editing the post while you replied. I tried to word the question in a more friendly way.)
- ChrisMarshallNY 6y agoIt's a C++ and a COBOL. The language has a lot of stuff that drives me nuts (in reality, it's not much of a drive –more of a short putt [Ed]). But it is quite performant, stable and capable. I have done a lot of PHP programming, and would be very happy to never work in it again. I have a tremendous respect for the language. It also has –literally– tens (if not hundreds) of thousands of expert developers, worldwide. Many of these developers used to stink, but are now much better, as a result of their work with PHP. It also has a massive support infrastructure. HN doesn't really appeal to the types of developers that make the lions' share of PHP (and C++) implementation base, so you won't always hear about it, hereabouts. I remember reading an article, some time ago, called "IT Runs on Java 8"[0]. It talked about how much of the IT landscape is composed of folks working in tech and patterns that are not considered "shiny/sexy." [UPDATE]: Not a problem. I do the same thing ;). The main thing that PHP has, that very few other languages have, is a gigantic implementation surface. In one of my more successful open-source projects, I deliberately wrote it in PHP (4, then, reluctantly, 5.6), because I knew that would give it a far better chance of being implemented. I was right. It is now fast becoming the de facto world standard for its demographic. [0] http://veekaybee.github.io/2019/05/10/java8/ http://veekaybee.github.io/2019/05/10/java8/
- spdionis 6y agoPHP mostly competes with Ruby, Python and Node in the web space. It is generally faster than Ruby and Python. It's not the mess that javascript is. Has a sane community with a wide range of well-maintained packages. Symfony is easily a rival to Django and RoR. At that point it's a matter of preference, but Symfony is top-notch quality. I wouldn't care for the ActiveRecord usage in RoR for example. I'm not sure that people saying low barrier to entry know what they're talking about. It's the same barrier to entry as for any other scripting language. If you're telling me about FTPing files: this is not how the PHP community has been working for the last ~10 years. All those people commenting "I have no idea who would start a PHP project today" live in a bubble, probably based in SV.
- tux 6y ago@spdionis, All those people commenting "I have no idea who would start a PHP project today" live in a bubble, probably based in SV. Indeed. And I would start a project in PHP anyday!
- simion314 6y ago>what do you think PHP does better than other languages? Most of the time is not language A vs language B in abstract, it really depends on the project and what experience you or your developers have. Let me give an example that is not web development. We had a desktop app and we had a feature where the user can submit feedback or bug reports. This feedback was stored and managed in a third party product that had an API, we could not call this API directly from the application because we did not want to put our keys in the app. So we had to put 1 php file on our server that contain the secret key, we done a POST from the app to the server and the script would validate and then connect to the API. I am imagining that some people today would solve this with some super engineered containers or micro services but the solution I used with just 1 file with a few lines of code could be implemented in a few minutes by a developer and maybe 1 or 2 hours by some competent non-developer.
- williamdclt 6y agoGood use of PHP I'd say, but as usual its strength really is that it's so easy to execute on any server. If you already had, let's say a Node backend, it would have been easier to just add an endpoint for this. The language itself, while I had no hate for it, doesn't have much advantages over Python/Ruby/JS/TS/other.
- simion314 6y agoSure, and for different jobs I used other languages. For one task there was a great python library so we use python and sent to it requests from PHP , some other task there was a java executable that worked the best so I called it from PHP, some other tasks there were Linux CLI tools that worked best so I called those, and some other task needed to use node and puppeter(a Chrome) wrapper - it was crashing a lot so we put it on a different server and called it from the main server PHP project. So in real world projects you don't chose the tool based on coolness factor, if you want to solve a problem in the best way possible you need to use the best tool for the job.