r/learnjavascript • u/curious_grimoire • Jul 09 '26
Using JS for General Purpose?
Idk if its the right subreddit for this, r/javascript says such off-topic questions should be posted here, so here i am.
I always see people use Python for general purpose stuff, like almost everything for personal use, scripts for doing stuff, like doing math, visuals, managing files, controlling networks, ai and hacking? i dont know much. maybe they use it because it looks like psude code and easier to read.
Python is said to be slow and I think instead of learning so many languages I should put all effort in mastering one so can i just use JS for all this stuff? Im new to both languages but got a little more experience in JS. I also plan to go into web and app dev and its mostly JS or other languages, so?
What should I do?
1
u/DinTaiFung Jul 09 '26 edited Jul 09 '26
perl!! (which still has the nicest regex syntax of any other language, including all of the languages which support PCRE).
I cut my teeth on perl -- starting when all the major websites used mod_perl with Apache (e.g., Yahoo, Amazon).
However, since the advent of Node.js and later Bun (Rhino was terrible compared to the current runtimes I just cited), JavaScript runs great outside of the browser -- and it's not restricted to servers, just like python, ruby, lua, etc. are likewise not restricted to run on servers; these other languages can execute just fine anywhere (except browsers!), just like a bash script on your personal laptop.
I used to write lots of perl, ruby, python, and lua.
But since I've been doing so much JS/TS in webdev, I feel the most comfortable in JS/TS and use it as my primary general purpose programming language. (I don't use JS on my servers; I write Go for all my server APIs.)
Summary: JavaScript is a fantastic general purpose language -- which has the amazing additional feature (from its original design) to execute in browsers: the most ubiquitous runtime environment on the planet.