3 ms·
JavaScript, really? I get the practical reasons why it’s useful, but I’m surprised it’s anyone’s choice for the design of a high level language. Is Python or R
by danpalmer 3y ago
JavaScript, really?
I get the practical reasons why it’s useful, but I’m surprised it’s anyone’s choice for the design of a high level language. Is Python or Ruby not a much better choice?
- hot_gril 3y agoPython's biggest inherent issue is it lacked async syntax for a long time. Haven't used the newer versions that have it, so idk how well it works. JS also has a way better package system and nicer syntax for objects and lambdas. Then the more practical issue is all the UI stuff integrates with JS rather than Py, and Py is even slower than JS. Ruby, idk, never used or even encountered it. Python was my main language for a while.
- danpalmer 3y agoThe syntax points are fair, but the lack of standard library in JS complicates so many things. I'd contest the idea that the JS package ecosystem is better – there is more tooling, but I'm not sure the tooling is better, and the average package quality is easily the lowest in any ecosystem I've worked in. I could see fully modern JS, without any transpilers, being an ok scripting language, I guess that's why React Native works well in that way.
- hot_gril 3y agoSeems like Python projects (e.g. the top Py-based Github repos) always have Dockerfiles because they know pip+venv or whatever is notoriously finicky, whereas JS projects will rely safely on npm which is quite portable. After fighting with my Python packages for so long, JS was refreshingly easy. For standard library, NodeJS keeps things pretty simple server-side. It's messier client-side with browser standards, but it's getting better, and Python can't even run in-browser. I like how JS evolves more gradually than Py which had the hard 2->3 transition.
- hot_gril 3y ago(But Py does have some nice features I miss in JS like generators and list/dict comp, making it overall nicer for data science type things.)
- andrewstuart 3y agoMy primary languages are Python and JS/TS. I have to say I really prefer TS. I know Python has types now but it doesn’t feel as good as TS.
- hot_gril 3y agoSomehow neither of them do the kind of automatic typing Rust has, I guess cause they were both bolted on.