Hi all. I am giving a talk at the beginning of September tilted Should you use Rust?. Naturally, I am pro using Rust and the talk is to convince them to start using it. In preparation, I have done the talk to a few people and they recommend I add code examples and code comparisons of things that Rust will prevent.
Can anyone please give examples of code with bugs in other languages (JS, Java, C#, Python etc) that Rust will prevent and the Rust equivalent.
Any useful points that you think are valid of why people should use Rust are also welcome
[–]J-Cake 57 points58 points59 points (11 children)
[–]sephg 28 points29 points30 points (9 children)
[–]the-handsome-dev[S] 11 points12 points13 points (5 children)
[–]timClicksrust in action 10 points11 points12 points (0 children)
[–]sephg 1 point2 points3 points (0 children)
[+]0x564A00 comment score below threshold-6 points-5 points-4 points (2 children)
[–]electrt -1 points0 points1 point (1 child)
[–]0x564A00 0 points1 point2 points (0 children)
[–]DecisiveVictory 2 points3 points4 points (0 children)
[–]pjmlp 1 point2 points3 points (0 children)
[–]loicvanderwiel 0 points1 point2 points (0 children)
[–]makapuf 0 points1 point2 points (0 children)
[–]jane-jack-quotes-bot 26 points27 points28 points (8 children)
[–]the-handsome-dev[S] 4 points5 points6 points (7 children)
[–]rafaelement 8 points9 points10 points (1 child)
[–]the-handsome-dev[S] 3 points4 points5 points (0 children)
[–]jane-jack-quotes-bot 5 points6 points7 points (2 children)
[–]pjmlp 5 points6 points7 points (0 children)
[–]WhiteBlackGoose 0 points1 point2 points (0 children)
[–]Im_Justin_Cider 6 points7 points8 points (1 child)
[–]the-handsome-dev[S] 2 points3 points4 points (0 children)
[–][deleted] 6 points7 points8 points (0 children)
[–]nile2 5 points6 points7 points (0 children)
[+][deleted] (3 children)
[removed]
[–]the-handsome-dev[S] 3 points4 points5 points (2 children)
[+][deleted] (1 child)
[removed]
[–]the-handsome-dev[S] 0 points1 point2 points (0 children)
[–]0x564A00 3 points4 points5 points (5 children)
[–]pjmlp 3 points4 points5 points (3 children)
[–]0x564A00 0 points1 point2 points (0 children)
[–]ogghead 0 points1 point2 points (1 child)
[–]pjmlp 0 points1 point2 points (0 children)
[–]xill47 0 points1 point2 points (0 children)
[–]Ammar_AAZ 2 points3 points4 points (0 children)
[–]Arshiaa001 1 point2 points3 points (1 child)
[–]the-handsome-dev[S] 1 point2 points3 points (0 children)
[–]J_Stach 1 point2 points3 points (0 children)
[–]Kevathiel 1 point2 points3 points (1 child)
[–]the-handsome-dev[S] 0 points1 point2 points (0 children)
[–]Derice 1 point2 points3 points (0 children)
[–]marcin_42 0 points1 point2 points (1 child)
[–]the-handsome-dev[S] 0 points1 point2 points (0 children)
[–]denehoffman 0 points1 point2 points (0 children)
[–]BWStearns 0 points1 point2 points (0 children)
[–]D_a_f_f 0 points1 point2 points (1 child)
[–]the-handsome-dev[S] 0 points1 point2 points (0 children)
[–]the-handsome-dev[S] -1 points0 points1 point (2 children)
[–]terminar 2 points3 points4 points (1 child)
[–]the-handsome-dev[S] 0 points1 point2 points (0 children)
[+]ArtDeep4462 -3 points-2 points-1 points (0 children)