Hacker News new | ask | show | jobs
by cute_boi 1670 days ago
This might be true for the web but for CLI apps etc I don't think this holds the case.

It’s exactly 180 degrees for me. Node js just seems to be super fast. And with typescript its heavenly.

I don't make a website and working on node js is fun. In PHP it is like doing something esoteric. Just a simple argument parsing is so hard in php compared to node js. In nodejs I use meow and even without docs, I can parse cli easily. In fact, I think Rust can be more easier than PHP in many cases. I usually rewrite in rust for long term daemons. Also in php I need to install php I don't know why I should install php-pdo etc. I mean why not just allow composer etc to handle like just like node do? I am frustrated with php stdlib which seems to be fossil at the moment.

The thing I like about PHP is laravel framework where I can set up websites instantly. Node js is fragmented with adonis and many other micro-framework.

1 comments

Stuff like argument parsing is left to frameworks. Laravel’s Artisan command system has all sorts of built-in functionality for exactly that.
I don't want to install Laravel for cli apps. For that most devs use symphony

https://symfony.com/doc/current/console/input.html

Installing laravel for cli is like buying thread ripper to run minesweeper.

Use whatever framework you like; the point is PHP leaves it largely up to them.