News for hackers. Stuff that matters.
Re:TypeScript Is Surprisingly OK for Compilers by andsoitis on Friday August 18, 2023 @08:52AM (#37174964)
> This is why once WebAssembly more polished and more common, languages like JS and TS could become obsolete since proper, more powerful languages will suddenly become a valid choice for Web.

JavaScript and TypeScript are not "proper" languages?

Different languages are powerful in different use case dimensions (tradeoffs), and the typical client-side web programming has a very very strong UI angle, which many "more powerful" languages that I am going to guess you have in mind are less adept at.

Re:TypeScript Is Surprisingly OK for Compilers by airstrike on Friday August 18, 2023 @09:32AM (#37175378)
JavaScript's redeeming quality is that it is ubiquitous due to being used by browsers. I don't think anybody credibly claims it to be a language we would want to use if we were to redesign web programming from scratch today
Re:TypeScript Is Surprisingly OK for Compilers by andsoitis on Friday August 18, 2023 @09:59AM (#37175698)
What follows is meant to be descriptive rather arguing "my camp is right".

> JavaScript's redeeming quality is that it is ubiquitous due to being used by browsers.

JavaScript has other properties that make it very adept at a wide range of web app usecases. Languages exist not in isolation, but have a dynamic environment w.r.t. domains they excel in, tooling, mindshare, programming in the small and the large, comlexity, etc.

> I don't think anybody credibly claims it to be a language we would want to use if we were to redesign web programming from scratch today

Dart has tried. Many languages transpile to JavaScript (and have for a long time).

Yet, JavaScript and TypeScript are some of the most popular languages on the planet.

If the web is still around in 20 years, it will be interesting to see whether another language has taken center stage. I'm not quite holding my breath, if only because even with transpilation being around for many many years, no other language has overtaken. I have a hard time seeing WASM changing that outcome in a meaningful way.

Re:TypeScript Is Surprisingly OK for Compilers by shepherdjerred on Friday August 18, 2023 @11:22AM (#37176862)
TypeScript is a pleasure to use. I have no desire to replace it with another language.
Re:TypeScript Is Surprisingly OK for Compilers by madeofpalk on Friday August 18, 2023 @11:50AM (#37177368)
Outside of the "everyone hates javascript" circle jerk, I really enjoy writing Typescript. I find its type system to be very natural and pleasent to use. It's my go-to for any generic task.
Re:TypeScript Is Surprisingly OK for Compilers by marcosdumay on Friday August 18, 2023 @12:35PM (#37178139)
> I don't think anybody credibly claims it to be a language we would want to use

Ouch, you posted this on the internet.

Somebody, somewhere is certainly going to claim this. Some of the people with that claim are even going to have a rationale behind it.

And to be fair, the tooling is going to push a lot of opinion. Because as bad as the JS/TS tooling is, its UI component has been evolving steadily while every other tool stagnated. And by now it has quite probably surpassed the 90's RAD paradigm (I mean, I can't make up my mind).

IMO, the language is one of the main things holding those tools back, but most people just won't agree.