Re:Microsoft: Rust Is the Industry’s ‘Best Chance’ at Safe S...
by simion314 on Saturday June 13, 2020 @03:02PM
(#23511788)
What Firefox done makes sense, but it does not look good to the idea you can just rewrite in Rust function by function. A regex engine seems to me a thing that is easy to TDD, so I would expect if rewriting in Rust is that easy Firefox would rewrite the most dangerous parts in Rust already (I assume regex is used with untrusted input but I am clueless so i could be wrong). IMO the giant army of Rust fans should put their energy working on Firefox or donating to have Firefox rewriten before 2030, because the story that is heavily promoted is that you can rewrite shit in Rust super easy, function by function, etc but the reality is different.
[ Parent
| on HN ]
Re:Microsoft: Rust Is the Industry’s ‘Best Chance’ at Safe S...
by frenchy on Saturday June 13, 2020 @03:25PM
(#23511960)
Firefox didn't choose the C++ regex implementation because rewriting pieces of code with well defined interfaces is hard. It was for a few reasons: 1) at the time they made the decision, there was no existing rust regex library that matched the way that JavaScript worked, 2) they didn't want to write their own/rewrite existing code because regex libraries are complicated beasts, 3) the C++ code is mature and well tested, so the primary benefit of a rust implementation would be more speed (because it's easier to safetly reason about shared data) they didn't think that optimizing the regex engine was a priority.
Re:Microsoft: Rust Is the Industry’s ‘Best Chance’ at Safe S...
by simion314 on Saturday June 13, 2020 @03:29PM
(#23511991)
It makes sense, I am still a bit disappointed (so is a subjective thing) hopefully the RIR crowd gets more rational and reads your explanation and see that is not so easy.
Re:Microsoft: Rust Is the Industry’s ‘Best Chance’ at Safe S...
by FuckButtons on Saturday June 13, 2020 @05:32PM
(#23512932)
>. A regex engine seems to me a thing that is easy to TDD
Why go to all that effort when the thing you need is already available? I don't think there are that many people that argue that everything, even the stuff that works fine and doesn't have issues, should be re-written just because rust exists.