by DanRosenwasser · 1mo ago · 0 comments
But more importantly, the Typescript team themselves [1] picked Golang mostly out of ergonomics and ease of porting at the time. It is becoming more increasingly more to "taste" what ergonomics means. Notably, they did not pick it because they believed it to be the fastest option. But speed was on the mind, giving way to ergonomics and ease of porting. At least, this is my read.
[1] https://github.com/microsoft/typescript-go/discussions/411
https://news.ycombinator.com/item?id=22336284
It is one person and one project, but I found it interesting to read about his experience.
I like Go, but I probably would have tried Rust first because I want pattern matching when implementing languages.
However, it mostly represents a mechanical port of the old codebase to Go. What I haven't seen anyone do is try a true rewrite in Go optimized for performance (whilst keeping a strong emphasis on readability).
Typescript team explicitly mentioned the lack of Typescript specification as one of the reasons to choose Go. Typescript as the language is defined currently by its compiler which was Javascript based. Go port is as close to it as possible while Rust would be harder to reach fully identical behavior.
Once you move beyond interpreters, performance is mostly a property of how much effort you want to put into profiling and optimization, not any specific properties of a programming language (YMMV of course).
The only real choice of language to build the next generation of JS tools in is JS. Anything else is a vote of no confidence in ourselves.
Writing Rust, Zig, or Go, you would still control memory manually, where it matters.
7-11 phases to go and so far it looks like it might only cost $100. I'm focusing on efficient execution strategy minimizing token in/out, turns, and rework.
Will prob post up something interesting when it's done.
I wonder how few tokens it could be done in. Might be relatively easy work compared to Rust.
Give it the goal of native AOT.. Have it profile and optimize after it gets a working version...
https://github.com/yuechen-li-dev/copeland
Compiles to JS, WASM via Blazor WebAssembly, C# RyuJIT and NativeAOT.
Maybe. Who knows, it's all changing so fast!