3 ms·
The Python 2.x to 3.x transition was also quite messy and long-winded but now 3.x rules the roost. Recent and coming PHP versions have done and will do away wit
by Ourgon 5y ago
The Python 2.x to 3.x transition was also quite messy and long-winded but now 3.x rules the roost. Recent and coming PHP versions have done and will do away with much of the evolved mess that the language accrued in the decades. Performance is OK, deployment is easy, it is nearly universally supported, the build system is quite a bit more sane than the spaghetti-ball-like mess around node and friends.
It is possible to use PHP for CLI apps as well but this is a bit of an afterthought:
if (PHP_SAPI == "cli") {
# CLI-code goes here
exit();
}
It is the right tool for a lot of jobs - not for all jobs but what language is?
- Axnyff 5y agoThe transition was awful but both Python 2 and Python 3 are good languages
- Ourgon 5y ago...which also have their problems, e.g. text encoding handling in Python 2.x was horrid and full of traps. This is better in 3.x, problem mostly solved. The same goes for many of the warts in PHP which have been fixed or are scheduled to be fixed in 8.1 and later. Given a choice between a world without PHP and one with it, warts and all, I choose the latter. Not because of its elegance or correctness or performance but because of its utility. In this respect it is a bit in the same situation as Bourne/Korn/Born_Again shell, languages which surely could be better in many ways but excel in just being there when you need them and for the purposes you need them. The language at hand is often the best language for the job, just like that phone camera in your pocket is the best camera to snap that shot of whatever event you just happened upon. Sure, it would have been better if you could use a DSLR on a stand, shooting raw to be processed in some fancy tool but that DSLR and stand and tool generally complicate matters far more than they add in quality. Sometimes this is worth it, often it is not.