Hacker News new | ask | show | jobs
by cisc 71 days ago
Why are you skeptical of Anders Hejlsberg's claims about his own language? He designed TypeScript.

Are you claiming that your own, separate programming language is faster than TypeScript, just like Go is faster than TypeScript? So in fact you agree with Anders?

1 comments

Yes, much faster. Conversely, I don't think Anders is claiming his Typescript implementation to be particularly fast - he believed JS wasn't fast enough to solve his performance problems. Which isn't true.

The TS compiler has always been slow. There are/were several TS-in-Rust/Go compilers long before Anders announced and released the offical Go version. I've also been writing transpilers since before TS was a thing, the TS team could have made it work in JS.

But it's often easier to switch to a language that gives you that structure/performance for free. "Free" in that large companies have the budget to afford a bug-for-bug port/rewrite.

Right, so you agree with him. TypeScript was too slow and switching to Go was the right choice.
Yes, only in that it's often easier to just rewrite it in a lower level language and be done. No, if you consider the time and effort for a bug-for-bug port.

They could have rewritten the Typescript compiler in better Typescript. I just peeked at random files in last TS compiler branch before the port (v6.0.3). Simply put, I would not have written it that way. That style would surely hit it performance cliffs.

If anyone from the TS team is lurking, I can be paid a reasonable consulting fee to talk lol. No free work from me, I'm already too busy with my own language.

Or contract me to match (or maybe even exceed) the Go port.

But I suspect Anders and the TS team are plenty satisfied with their Go port. So maybe, it'll be more of an educational adventure.