logoalt Hacker News

uncle_kostya • today at 2:56 PM • 5 replies • view on HN

I'm curious about motivation - bounds checks for corrupted inputs seems like it would be one, but it also seems that fixing corrupted input handling in a C/C++ code base would not be too hard, and probably less of an effort? So why did you choose the rewrite?

And second, did you use any AI tools for the rewrite?


Replies

fotcorn • today at 3:14 PM

> fixing corrupted input handling in a C/C++ code base would not be too hard

The best programmers on the planet have tried and failed with this task for 50 years now, so I don't think this is true.

The main disadvantage of Rust right now is not supporting some more obscure platforms, but because mold wouldn't support them anyway I don't see that as a problem.

➕ show 1 reply
saghm • today at 3:19 PM

My very naive understanding is that a part of what makes mold fast is concurrency, which I'd expect to be a lot more error-prone in C/C++. Not having to worry about data races might give more confidence with trying out more complex techniques for how to split up work in a way that ends up making things faster

pornel • today at 3:14 PM

I suspect fearless concurrency is another motivating factor. Better perf can be achieved by squeezing more parallelism, but without borrow checking it's difficult to do fine-grained parallelism correctly.

LoganDark • today at 3:03 PM

> And second, did you use any AI tools for the rewrite?

IMO, given the recent commits: almost certainly.

marsven_422 • today at 3:57 PM

[dead]