If you had to choose one programming language that you had to use for the rest of your life, what would it be?

hades@lemm.ee to Programming@programming.dev – 101 points –
162

You are viewing a single comment

JavaScript. I can't think of anything else that can be used for everything. It's a back-end language, a front-end language, it can be used for styling and animation, it can be an OOP language or a scripting language, and can make database queries & submissions. Is there another language that is as versatile for website development? I can't think of one.

So while this is probably a good answer to the hypothetical question, that's actually not a good thing, you realize that, right?

Special tools exist because different problems require different solutions. And sure, then can be a huge overlap of those tools, but you can't literally do everything with a single tool; chances are it'd be a shitty tool. Either you can't actually do everything with it, or it's so complex that you don't want to use it in the first place.

Javascript is somewhere in between, in the sense that it's both kinda terrible for most of the jobs you mentioned, while also not actually usable for "everything" - i.e. it'd be a terrible language for anything that needs to be performant or reliable. Hell, we have JS in crap like Gnome now and it's a nightmare.

Yeah Rust can do all of those things as well, JavaScript is obviously much more common.

a front-end language

I love rust but this requires killing the web app and using basic html. which i'm also pro.

Well, not quite, since Rust got WebAssembly support quite early.

Web assembly isn't quite the same as a js frontend though, is it?

It's typically for complex single page apps and has some weirdness with normal usecases, no?

I could be wrong but I was looking into it a few months ago and it seemed immature.