15 comments

[ 2.9 ms ] story [ 48.2 ms ] thread
its the favorite language for developers because its the only language most developers these days bother to learn. Its a great language if you're lazy as you can use it everywhere and don't need to expand your mind with other tools.
for anyone downvoting, I started off in javascript and was a nodejs dev for 8 years before I expanded my toolset. Its a fine language for a lot of situations but its not the end all be all. Just calling out the fact that a lot of devs out there learn JS and never go beyond it.
I don't think it was your intention but you're being downvoted because it came across as you calling people who prefer JavaScript "lazy" and that they "don't need to expand [their] mind". Usually when I need to use JavaScript it's because it's the right business decision, not because I'm lazy and unwilling to learn.
> because it's the right business decision

the only objective advantages of javascript is the availability of libraries and being able to build web applications with a single codebase. Beyond that, the only other reason people go with javascript is the ease of hiring js devs like cogs in a machine which is self fulfilling as then new people always go to js.

But js is an objectively terrible language. Downvote me if you want but I spent years getting good at rooting out different classes of production bugs in javascript. Its not a good platform to build rock solid highly reliable infrastructure. A good developer can certainly do it for the same reason you can write good software in any platform. sqlite is written in c after all. But the language will lead you towards all sorts of dangerous bugs until you've spent years learning how to wrangle it.

As for "business decisions" yea optimizing for easy hiring is how you end up with using javascript to write native mobile apps. a platform constrained in memory. You could make the argument that its afine for simple apps but how many startups died trying to push react native past what could be reasonably performant? I'll grant that v8 has done an excellent job at optimization but javascript the language isn't doing it many favors. Just about every startup that gets anywhere eventually backs away to native.

Then there's electron. Beyond cross platform, The real big reason is you can throw a ton of javascript devs at it. Why bother prioritizing things like efficient battery usage? It would be amazing if some of that mindshare went to cross platform UIs for rust...

Anyways, thats my rant. This is not to say javascript is never useful. certainly not all javascript devs are lazy but there are a lot out there who only know javascript. You cant evaluate all options if you don't have a frame of reference to evaluate all the options.

me: Senior nodejs dev for 8 years before jumping to elixir because its design bypasses whole classes of issues javascript devs regularly run into when scaling.

I'm not arguing JavaScript isn't bad. It's pretty bad.

Node.js and React Native are much easier to argue against than JavaScript for the web. It's pretty rare to pick something other than JS for an interactive website (although that is starting to change).

I've used React Native for a few years. RN is fine, fast enough for most use-cases. They somewhat recently built a custom JS engine called Hermes that's even faster than v8.

> Just about every startup that gets anywhere eventually backs away to native.

I really doubt that, but regardless not everything is a startup. Your banking app or that parking app you have to download and use only once will work just fine with the slowness of React Native.

That said I like Flutter notably more than React Native (imo Dart is slightly better than TypeScript and way better than JavaScript), and I guess I agree with your larger point, that people aren't exploring their options enough. Flutter might often be the better choice, but people reach for React Native out of familiarity.

> Its a great language if you're lazy as you can use it everywhere and don't need to expand your mind with other tools

Bad take. Learning tools is the means to an end. Being able to minimize tooling time and focus on productive output is what makes the JS stack so popular.

I don't agree with OP, there's nothing wrong with JS but I think the reason langs like JS and Typescript always top these lists of popular languages is they're the only viable options right now for client side web development.
I disagree. My entire backend is written in Typescript and maintenance and feature development pace is incredible. It's been this way for years now and I cannot see myself switching to Go or Java anytime soon.
The pace is only "incredible" if you've never spent a year using a truly productive back-end language like Ruby, Elixir, or to a lesser degree PHP or Python.

Golang and Java are both tilted more towards performance and enterprise-friendliness than dev productivity and JS/TS are in the middle of the spectrum.

I’m all for people learning other languages, especially across different paradigms. I encourage newer devs to learn a more “obscure” language when I’m leading or mentoring them, oftentimes Clojure since I learned so much from it myself. I wouldn’t for a minute suggest any of them are lazy if they don’t take that advice, or defer it indefinitely. Learning a significantly novel thing for personal edification can be intimidating[1]. People have jobs to do and lives to live[2]. Not everyone is so passionate about the craft, and I’d even say not everyone should be. And some of us who are so passionate have to choose what we pursue with the time and energy available to us, knowing we’ll leave other opportunities to learn unexplored[3].

All of which is to say, I’d love it if people branched out more from TypeScript, and the whole set of JS ecosystems, more than they do. But I don’t think disparaging them does anyone any good, or fairly reflects their talent, dedication, curiosity, or any other quality of their being.

1: I’m saying this as someone who very much would like to learn lower-level programming but have almost totally put it off for several decades.

2: I’m also saying it as someone who clung very firmly to the familiarity of first PHP, then JavaScript, until I had a really compelling reason to learn FP on the job.

3: I’m also presently spending some part of my current vacation time learning math pertinent to an art project, rather than picking back up learning Rust. The math is actually more challenging for me in a lot of ways, and learning Rust would be more personally rewarding in some. If I were better disciplined, I’d be reacquainting myself with a guitar, rather than trying anything new with a computer.

I was interested to see what took the top position... and it's Typescript, which isn't very surprising.

I avoided TS for a while because I thought it was just another project like coffeescript which I never liked but once I started down the 6to5 path (now called babel) it was stupid-easy to to try out TS and I fell in love. Code completion is so much better, it brings more sanity to JS, prevents foot-guns, works great with a team, and gives me confidence in my changes/refactors.

Now I write TS exclusively aside from some legacy JS that doesn't have (and never will) a build pipeline. I even wrote my backend for a side-project fully in TS and quite enjoyed it. I've not played with Deno yet as it's feels a little too early for me (I don't really like living on the bleeding edge with some exceptions) but I'm super excited to see it progress and grow. TS, for all it's advantages, is still held back by the need for a packaging/build step and since TS is built on top of JS there are always some rough edges. Those rough edges are more than worth putting up with in my experience and I look forward to the future of TS.

TS’s type system is incredible but it only takes one line of dodgy JS to remove any guarantees that the number you are about to use is actually a string.