Hacker News new | ask | show | jobs
by ilrwbwrkhv 546 days ago
Okay, since you made quite a good argument, I will give you my counter.

The primary problem with JavaScript is that one, the entire ecosystem is prone to breaking. It is a very brittle system.

Next, TypeScript gives you an allure of safety, but at the edges it breaks down because underneath it, it's all just untyped JavaScript.

And the last and the most important one is because it makes it so easy to wrap functions in each other and there are no patterns at all, there is a lot of indirection in most typescript code bases.

This causes API surface area bloat which becomes hard to maintain in the long term.

And tooling doesn't completely solve for this problem either. I have seen code bases where the LSP struggles because of tons of generic types.

I think the most pragmatic alternative is Golang if you are building APIs.

And for a full stackish framework Phoenix and Elixir is a great choice.

Or you can just go all in on Rust like my companies and you get the best of everything.

1 comments

JS/TS primary target is running interactive code in webbrowser. What are the good alternatives?
Sure if you are building a highly interactive app like Google maps go crazy on the javascript but keep it only for that.
I think some business SPA is heavily benefited from JS/TS too.