News for hackers. Stuff that matters.
Re:A 10x Faster TypeScript by fixprix on Tuesday March 11, 2025 @11:52AM (#43333700)
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-of-time compilation options available, but they're not on all platforms and don't really have a decade or more of hardening. They weren't engineered that way to begin with. I think Go also has a little more expressiveness when it comes to data structure layout, inline structs, and so forth."

Re:A 10x Faster TypeScript by electroly on Tuesday March 11, 2025 @11:57AM (#43333754)
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 by polskibus on Tuesday March 11, 2025 @12:19PM (#43334037)
A missed opportunity to improve c# by dogfooding it with TS compiler rewrite.
Re:A 10x Faster TypeScript by mohsen1 on Tuesday March 11, 2025 @12:39PM (#43334269)
C# is too old to change that drastically, just like me
Re:A 10x Faster TypeScript by geodel on Tuesday March 11, 2025 @01:38PM (#43335017)
They are trying to finish their current project and not redo all the projects which their current project may depend upon.
Re:A 10x Faster TypeScript by cxr on Wednesday March 12, 2025 @02:56AM (#43340555)
"Finish"?
Re:A 10x Faster TypeScript by vips7L on Tuesday March 11, 2025 @12:59PM (#43334570)
An unpopular pick that is probably more low level than Go but also still has a GC: D. Understandable why you wouldn't pick D though. Its ecosystem is extremely small.
Re:A 10x Faster TypeScript by 999900000999 on Tuesday March 11, 2025 @01:44PM (#43335090)
I think you D fans need to dogfood a startup based around it.

It's a fascinating language, but it lacks a flagship product.

I feel the same way about Haxe. Someone created an amazing language, but it lacks a big enough community.

Realistically languages need 2 things for adoption. Momentum and ease of use. Rust has more momentum than ease, but arguably can solve problems higher level languages can't.

I'm half imagining a hackathon like format where teams are challenged to use niche languages. The foundations behind these languages can fund prizes.

Re:A 10x Faster TypeScript by vips7L on Tuesday March 11, 2025 @01:51PM (#43335176)
Did my post come off as a fan? I directly criticized its ecosystem. It wouldn't be my first pick either. I was just making conversation that there are other options.

And AFAIK Symmetry Investments is that dogfood startup.

Re:A 10x Faster TypeScript by WuxiFingerHold on Tuesday March 11, 2025 @11:34PM (#43339719)
Thanks for the link. I'm not fully convinced by Anders answer. C# has records, first class functions, structs, span. Much control and I'd say more than Go. I'd even say C# is much closer to TS than Go is. You can use records for the data structures. The only little annoyance is that you need to write the functions as static methods. So an argument for easy translation would lead to C#. Also, C# has advantages over Go, e.g. null safety.

Sure, AOT is not as mature in C# but is this reason enough to be a show stopper? It seems there're other reasons Anders don't want to address publicly. Maybe as simple reasons as "Go is 10 times easier to pick up than C#" and "language features don't matter when the project matters". Those would indeed hurt the image of C# and Anders obviously don't want that.

But I don't see it as big drama.

Re:A 10x Faster TypeScript by mexicocitinluez on Wednesday March 12, 2025 @07:37AM (#43342152)
I dont think there are other reasons.

The side-by-sides that show how Go code is closer to the current TS code (visually) than C# would be are pretty compelling. He made it pretty clear they're "porting" not rewriting.

Re:A 10x Faster TypeScript by WuxiFingerHold on Wednesday March 12, 2025 @02:02PM (#43345978)
After reading the long Github thread, I think you're right. It's probably just as simple as "what is the easiest way to copy our TS code 1:1 to a faster language". And this case Go wins due to its simplicity.
Re:A 10x Faster TypeScript by mexicocitinluez on Thursday March 13, 2025 @07:41AM (#43352313)
What's funny is that while I understood a chunk about why that made that decision, a ton of things they were talking about went over my head. But then we they showed the side-by-side, I was like "Well that makes sense".
Re:A 10x Faster TypeScript by saturn_vk on Thursday March 13, 2025 @11:02AM (#43354073)
> You can use records for the data structures. The only little annoyance is that you need to write the functions as static methods. So an argument for easy translation would lead to C#. Also, C# has advantages over Go, e.g. null safety.

Wouldn't these things be useful if you are making an actual compiler, that would run TS? Since in this case, the runtime is JS, I don't think any of these things would get any usage, unless they are used in the existing transpiler.

Re:A 10x Faster TypeScript by Rapzid on Wednesday March 12, 2025 @07:49PM (#43348931)
Sounds like C# was too late with dictionary collection expressions.