• 6 Posts
  • 90 Comments
Joined 1 year ago
cake
Cake day: June 11th, 2023

help-circle

















  • The thing is that, in C the API could be slightly different and you could get terrible crashes, for example because certain variables were freed at different times, etc.

    In Rust that is literally impossible to happen unless you (very extremely rarely) need to do something unsafe, which is explicitly marked as such and will never surprise you with an unexpected crash.

    Everything is so strongly typed that if it compiles… It will run without unexpected crashes. That’s the difference with C code, and that’s why Rust is said to be safe. Memory leaks, etc, are virtually impossible.



  • I just wish every programmer completed the rustlings game/tutorial. Doesn’t take that long.

    I didn’t even fully complete it, and it made me a way better programmer, because it forces you to think RIGHT.

    It may sound weird for people who haven’t experienced it, but it’s amazing when you get angry at the compiler and you realise… It is right, and you were doing something that could f*ck you up 2 months in the future.

    And after a bit of practise, it starts wiring your brain differently, and now my Python code looks so much better and it’s way more safe just because of those days playing around in rustlings.

    So yeah, Rust is an amazing language for everything, but particularly for kernel development. Either Linux implements it, or it’ll probably die in 30 years and get replaced with a modern Rust kernel (Redox OS?).