HN2new | past | comments | ask | show | jobs | submitlogin

Most of the time you do not chose a language or ecosystem because it has some cool syntax or some new feature. As an example if you need to do X you look at what solves X the best, if I can do X by installing say ffmpeg and write a bash script I will do that and not cry that bash does not have some cool feature.

I think languages like PHP, Java, C++ appeal for people that solve hard problem where the fact that you have a giant ecosystem of existing libraries and a large number of existing developers compensates the fact that the language is not "cool" or is missing some feature that you probably don't need anyway or workaround it with a library.



X sometimes stands for problems above technical problem, such as:

- Existing team is comfortable with using PHP - Existing project is tightly coupled PHP monolith - Existing project cannot be migrated to other language fast enough if needed

All are valid and justifiable reasons. Learning new language is not the easiest and we should think of the people.

I must emphasis though, all party must not freeze in time. They should learn to adapt. PHP is getting smaller. The decline is slow enough to let people migrate or jump ship but fast enough that it is recognizable.

Demands are growing for languages and environments which provide more than PHP, simplest examples would be granular websocket connection control, explicit process control, whitelist-by-default security, rise of cloud and edge computing, and of course, trends, "cool new stuffs" which is not always good for everybody, but always exciting especially for the naives.

There might be a day Java is getting replaced due its huge memory usage or its tendency to be verbose and hard to read. Golang is a contender for the memory usage side of the spectrum, NodeJS is the contender for the ease of use side of the spectrum.

There might be a day C++ is getting replaced due to its "harder to write secure code". C++20 is quite cool, but there's a new cool kid Rust where you most probably won't write bad code, can be actually faster than C++ / C in some cases, and can run on browsers.

May all programmers of old languages survive and thrive and in the new world.


Sure, but sometimes X is something like you have a video and you want to use the GPU to analyze it and the best library for that is in C and there are great python bindings. So a professional developer would use C or Python and not waste his client time by trying to create it's own unmaintainable CoolLang bindings (where this dev is just now learning CoolLang and there are not that many people that know CoolLang).

Even for new projects, say you have a desktop app and you want to let the users submit some data and save it on your server(like feedback or crash reports), you can do this on your server with 1 PHP file and a few lines of code, no dependencies on 300 packages.


You can do this in Spring Boot/ Java, with one Java class and one config file.

And it will likely be an order of magnitude more scalable & reliable than the PHP, having proper logging, security features, etc.

Whereas such PHP systems in my experience tend to be unreliable, in need of maintenance and often broken.

The Java/ Spring Boot option will also take you all the way to a high-end commercial system/ large website/ webapp.


You installed a framework Spring for a simple feature to grab some text from a POST request and dump it into a database. Since in general you don't have thousands of users sending feedback at the same time I don't need a framework and if you know how to correctly create SQL statements you don't need a framework for SQL. There is nothing to log, if the db call fails you can put some text in a log file or do a curl to a different url to notify you.

It will also be probably faster then a Java framework since you don't have a function call stack 30 levels deep (not a Java issue , all magic frameworks including PHP one have such giant call stacks)


I'd use whatever lightweight and secure I can find at a moment.

Simple file upload without any future expansion plan doesn't need hours of discussion.


It depends on the customer, will they give you a server dedicated for your Java framework so you can handle at maximum 5 POST request per day or will day give you access to the existing website they have for the company, that already has PHP,mysql installed. Honestly you are not doing the fair thing for the customer if you ask for a new server because you want to use your prefered tool and not the best thing for this job.

Btw my scenario was about sending feedback ro stack traces, this are just text, no giant file uploads and nothing insecure about it.


Yes, and all three of them has very good backwards combability, one of the most underestimated features in a language for developers but one of the most important ones for building a stable business.

I recently upgraded a huge legacy codebase from PHP 5.2 (released 2006) to PHP 7.4 (released 2019) with relatively few changes, mostly changing the use of deprecated functions & misuse of variable references.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: