Hacker News new | past | comments | ask | show | jobs | submit login

okay so basically the faster compiling means a tigher feedback loop for the LLM to -know- if the code compiles or not etc? interesting

is go faster than rust?




> is go faster than rust

No.

They rewrote in go because go is similar enough to typescript, while being faster than typescript.

Source: https://github.com/microsoft/typescript-go/discussions/411


No. Ignore the other comments.

The reason for this decision is that they wanted a near 1:1 port of the typescript code to go, keeping design and structure almost identical.

You can’t do that in rust as easily because of all the cyclical references and indirection involved.

A rust port would be a rewrite. This is merely a migration.


Go’s compiler is WAY faster than Rust’s. As far as speed of the actual program, Rust will generally be faster.


Go or Rust compiler speeds won't have any effect here. The program in this context is the TypeScript compiler.


cargo check is WAY faster than go build


Working with both I can say that this is a big no, go mod is as fast if not faster, usually Go dep are much faster because Go does not import as much dependencies as Rust.


In Rust you only need to compile your dependencies once. After that it's just your app because dependencies don't change.


This may be true, but in my experience Rust is still slower to compile because monomorphization must be done for deps every time you compile, even for deps that are already compiled. And monomorphization ends up taking a long time because it is done on every type/function that uses generics, and Rust code tends to use generics very liberally.


that is also the case in Go…?


Sure, but the point is: don't be scared of dependencies in Rust.


Well the context was a comparison of pros and cons and you started with “in Rust” so perhaps you can see why it sounded like you were presenting it as a pro.


Go has a very simple type system that is easy to typecheck on every token.

TypeScript has a type system that is complex enough, you can literally implement wasm inside it (and then use that to run e.g. Doom: https://socket.dev/blog/typescript-types-running-doom)


> is go faster than rust?

Depends on how you write the Go or Rust code. The most optimal Rust re-write of the TypeScript compiler would very likely be faster than the most optimal version in Go. However they didn't want to do a re-write, they wanted to port the existing compiler codebase written in TS. Go like TS (ultimately the JS runtime) also has GC which makes a 1-to-1 port much easier.


[flagged]


What?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: