Post

every time I've fixed an exploitable memory safety vulnerability in C/C++, I do it by noticing the code's violations of Rust's borrowing rules and then I translate the idiomatic Rust solution back to C/C++.

0 reposts8 likes

Similarly, I expect programmers that have used Typescript but are working on Javascript code will tend to imagine type annotations on every variable, and then they'll regularly find bugs in Javascript code by noticing where this is hard to do.

I think anyone who wants to be a better C/C++ or Javascript programmer should learn Rust or Typescript (and then also consider how much benefit they would get from working in a language where the compiler can directly check this otherwise mental work).