I agree that JavaScript is fast - but we've ruined that in a lot of places by throwing in things like code genertion, compilation, builds, and other nasty words. The turnaround for the last React&Node program I had the displeasure of working with was on average 30 seconds.
PHP - for all its faults - does not suffer from these kinds of recompilation issues, yet can be optionally pre-compiled for added speed when you do go to production.
Re:Fun vs. Computer Science (2016)
by caseymarquis on Saturday August 26, 2017 @10:39AM
(#15105633)
I don't use backend js, but things like webpack-dev-server which on file save do an incremental recompile and then hot reload have made this a non issue on the frontend for me. Not sure if this applies to your use case, but figured it couldn't hurt to offer a partial solution.
On the backend side, tools like nodemon provide a very similar solution. Then just setup your webpack server to proxy requests to your backend, and you're good to go.
Re:Fun vs. Computer Science (2016)
by konschubert on Saturday August 26, 2017 @08:28AM
(#15105163)
So is python, which is a much nicer language.
Re:Fun vs. Computer Science (2016)
by thesmallestcat on Saturday August 26, 2017 @11:41AM
(#15105908)
You don't know what you're talking about. Python process needs to be bounced, or has to watch files and bounce itself on change. The PHP runtime is designed to read the file on each request. You have to go out of your way to require restarts (it is an optimization). PHP has the only mainstream runtime AFAIK that is designed this way (+ the model is stateless, so each refresh really is one). I'm not a PHP fan but it bothers me that people don't acknowledge some of its important, unique features and are content to rag on its inadequacies. It bothers me because we're probably ten years from people forgetting what PHP was, and creating a new, worse PHP (!).
Re:Fun vs. Computer Science (2016)
by jaipilot747 on Saturday August 26, 2017 @12:27PM
(#15106129)
This message would have been just as effective without the opening accusation.
Re:Fun vs. Computer Science (2016)
by thesmallestcat on Saturday August 26, 2017 @12:40PM
(#15106185)
Sorry, you're right, I was annoyed by the "hurr durr Python" tone.
Re:Fun vs. Computer Science (2016)
by 35bge57dtjku on Saturday August 26, 2017 @01:40PM
(#15106458)
It didn't even have that tone...
Well it does just assert without any supporting argument that Python is a nicer language, which is textbook flame-war starting.
Re:Fun vs. Computer Science (2016)
by 35bge57dtjku on Saturday August 26, 2017 @05:30PM
(#15107585)
Your assertion that giving an opinion without supporting evidence is automatically "textbook flame-war starting" is also patently silly.
Re:Fun vs. Computer Science (2016)
by konschubert on Tuesday August 29, 2017 @04:36PM
(#15127412)
Sorry, when I said "Nicer language", i meant that it has a more readable syntax.
On top of that, I was comparing Python to JavaScript and wasn't even talking about PHP, which, as you rightly discovered, I have very little knowledge about.
Python can reload modules while running. This is standard practice. And anyway, bouncing a Python process is instantaneous.
JavaScript is just as fast, or faster. That's probably an important reason why it's "eating the world".