Live data from Hacker News

A 10x Faster TypeScript

devblogs.microsoft.com

161–170 of 943 posts

Re: A 10x Faster TypeScript

#161
post #99

Earlier quoted context omitted.

If you have to explain why something is not ambiguous it is by definition ambiguous.

No. Ambiguous means that a statement has many possible meanings, not simply that something might be confusing.

I'm a bit confused:

- It's not ambiguous because they mean $X.

- It is ambiguous because it has many possible meanings.

- It is not ambiguous because it has many possible meanings

Re: A 10x Faster TypeScript

#162

Earlier quoted context omitted.

Anders Hejlsberg explains here: https://youtu.be/10qowKUW82U?t=1154 . TL;DW: - C# is bytecode-first, Go targets native code. While C# does have AOT capabilities nowadays this is not as mature as Go's and not all platforms support it. Go also has somewhat better control over data layout. They wanted to get as low-level as possible while still having garbage collection. - This is meant to be something of a 1:1 port rat…

This is shockingly out-of-date statement by Anders. I'm not sure what's going on, I guess he's just not involved with the runtime side of .NET at all to actually know where the capability sits circa 2024/2025. But really, it's a terrible situation to be in. Especially just how worse langdev UX in Go is compared to C#, F# or Rust. No one would've batted an eye if either of those was used.

> Especially just how worse langdev UX in Go is compared to C#, F# or Rust.

Can you explain why the DX in Go is "worse"? I've seen the exact opposite during my professional work.

Re: A 10x Faster TypeScript

#163
post #84
post #63

Earlier quoted context omitted.

Not involved, but there's a faq in their repo, and this answers your question, perhaps, a bit: https://github.com/microsoft/typescript-go/discussions/411

Thanks, but it really doesn't clarify why a team with roots on the .NET ecosystem decided C#/Native AOT isn't fit for purpose.

Pure speculation, but C# is not nearly the first class citizen that go binaries are when you look at all possible deployment targets. The “new” Microsoft likely has some built-in bias against “embrace and extend” architectural and business decisions for developers. Overall this doesn’t seem like a hard choice to me.

Cue rust devotees in 3, 2, ..

Re: A 10x Faster TypeScript

#164

Earlier quoted context omitted.

We did anticipate this question, and we have actually written up an FAQ entry on our GitHub Discussions. I'll post the response below. https://github.com/microsoft/typescript-go/discussions/411 . ____ Language choice is always a hot topic! We extensively evaluated many language options, both recently and in prior investigations. We also considered hybrid approaches where certain components could be written in a nativ…

This is a great response but this is "why is Go better than JavaScript?" whereas my question is "why is Go better than C# , given that C# was famously created by the guy writing the blog post and Go is a language from a competitor?" C# and TypeScript are Hejlsberg's children; C# is such an obvious pick that there must have been a monster problem with it that they didn't think could ever be fixed. C# has all that stuf…

It’s a political anti-benefit in most of the open-source world. And C# is not considered a high quality runtime once you leave Windows.

Re: A 10x Faster TypeScript

#165
post #5

Fast dev tools are awesome and I am glad the TS team is thinking deeply about dev experience, as always! One trade off is if the code for TS is no longer written in TS, that means the core team won’t be dogfooding TS day in and day out anymore, which might hurt devx in the long run. This is one of the failure modes that hurt Flow (written in OCaml), IMO. Curious how the team is thinking about this.

Hey bcherny! Yes, dog-fooding (self-hosting) has definitely been a huge part in making TypeScript's development experience as good as it is. The upside is the breadth of tests and infrastructure we've already put together to watch out for regressions. Still, to supplement this I think we will definitely be leaning a lot on developer feedback and will need to write more TypeScript that may not be in a compiler or language service codebase. :D

Re: A 10x Faster TypeScript

#166

Hi folks, Daniel Rosenwasser from the TypeScript team here. We're obviously very excited to announce this! RyanCavanaugh (our dev lead) and I are around to answer any quick questions you might have. You can also tune in to the Discord AMA mentioned in the blog this upcoming Thursday.

Well-optimized JavaScript can get to within about 1.5x the performance of C++ - something we have experience with having developed a full game engine in JavaScript [1]. Why is the TypeScript team moving to an entirely different technology instead of working on optimizing the existing TS/JS codebase? [1] https://www.construct.net/en

How does that scale with number of threads?

Re: A 10x Faster TypeScript

#167
post #25

It’s not obvious from the text, but the compiler was previously written in TypeScript (which was kind of a strange choice for the language to write a compiler in).

I don't consider it strange, and I'm not alone: https://news.ycombinator.com/item?id=37171801

Re: A 10x Faster TypeScript

#168

Earlier quoted context omitted.

This is a great response but this is "why is Go better than JavaScript?" whereas my question is "why is Go better than C# , given that C# was famously created by the guy writing the blog post and Go is a language from a competitor?" C# and TypeScript are Hejlsberg's children; C# is such an obvious pick that there must have been a monster problem with it that they didn't think could ever be fixed. C# has all that stuf…

Anders answers that question here - https://www.youtube.com/watch?v=10qowKUW82U&t=1154s Transcript: "But I will say that I think Go definitely is much more low-level. I'd say it's the lowest level language we can get to and still have automatic garbage collection. It's the most native-first language we can get to and still have automatic GC. In contrast, C# is sort of bytecode-first, if you will. There are some ahead…

This is a great link, thank you!

For anyone who can't watch the video, he mentions a few things (summarizing briefly just the linked time code, it's worth a watch):

- Go being the lowest level language that still has garbage collection

- Inline structs and other data structure expressiveness features

- Existing JS code is in a C-like function+data structure style and not an OOP style, this is easier to translate directly to Go while C# would require OOPifying it.

Re: A 10x Faster TypeScript

#169

Earlier quoted context omitted.

This is a great response but this is "why is Go better than JavaScript?" whereas my question is "why is Go better than C# , given that C# was famously created by the guy writing the blog post and Go is a language from a competitor?" C# and TypeScript are Hejlsberg's children; C# is such an obvious pick that there must have been a monster problem with it that they didn't think could ever be fixed. C# has all that stuf…

It’s a political anti-benefit in most of the open-source world. And C# is not considered a high quality runtime once you leave Windows.

Modern C# (.NET Core and newer) works perfectly fine on Linux.

Re: A 10x Faster TypeScript

#170
post #65

So in order to get "Faster TypeScript" you have to port the existing "transpiler" in a complied language that delivers said faster performance. This is an admission that these JavaScript based languages (including TypeScript) are just completely unsuitable for these performance and scalable situations, especially when the codebase scales. As long as it is a compiled language with reasonable performance and with prope…

They're not getting "faster typescript", they're getting "a faster typescript transpiler / type checker"; subtle but important difference. The runtime of TS is Javascript engines, and most of "typescript transpilation" is pretty straightforward removal of type information.

Anyway, JS is not immature in performance per se, but in this particular use case, a native language is faster. But they had to solve the problem first before they could decide what language was best for it.

Post reply on HN