←back to thread

383 points hkalbasi | 1 comments | | HN request time: 0.278s | source
Show context
throwaway106382 ◴[] No.42814864[source]
> Mold is already very fast, however it doesn't do incremental linking and the author has stated that they don't intend to. Wild doesn't do incremental linking yet, but that is the end-goal. By writing Wild in Rust, it's hoped that the complexity of incremental linking will be achievable.

Can someone explain what is so special about Rust for this?

replies(11): >>42814916 #>>42814925 #>>42814952 #>>42814958 #>>42814975 #>>42815031 #>>42815056 #>>42815091 #>>42815564 #>>42816061 #>>42816644 #
1. IshKebab ◴[] No.42815031[source]
There are two main factors:

1. Rust's well designed type system and borrow checker makes writing code that works just easier. It has the "if it compiles it works" property (not unique to Rust; people say this about e.g. Haskell too).

2. Rust's type system - especially its trait system can be used to enforce safety constraints statically. The obvious one is the Send and Sync traits for thread safety, but there are others, e.g. the Fuchsia network code statically guarantees deadlocks are impossible.

Mold is written in C++ which is extremely error prone in comparison.