← Back to context

Comment by veidr

1 day ago

It's also a recipe for failure for ports in general. Same goes for the "not idiomatic Rust" comments above — that would be nonsense.

You want to port it as faithfully as possible to the original, porting it bug-for-bug, quirk-for-quirk. Then, over time, after the port has been proven to be as identical to the original as possible, you can gradually fix those kinds of internals.

That's why TypeScript's tsgo native port is so good.

tsgo will inherit many benefits from go, even if it is never fully "idiomatic".

This is in direct contrast to this port, which requires significant re-architecting (or made "idiomatic", if you wish) in rust to achieve any of the benefits of the language. You can't re-architect one step at a time.

  • I don't think you want to achieve any benefits of Rust in the initial port. Because at this scale you will definitely introduce new, and probably subtle, bugs that are not present in the Zig version.

    You just want it to be the same, to the maximum extent the language allows. E.g. 1000+ unsafe is the right move, for now.

    Reaping the benefits of Rust is for _future_ development.

    • That's my point - I don't see any hope of removing the 10,000+ unsafe calls, especially not one step at a time.

      As such, this is a publicity stunt.

      2 replies →