News for hackers. Stuff that matters.
Re:Microsoft: Rust Is the Industry’s ‘Best Chance’ at Safe S... by loeg on Saturday June 13, 2020 @02:10PM (#23511357)
The bar here is C.
Re:Microsoft: Rust Is the Industry’s ‘Best Chance’ at Safe S... by lukevp on Saturday June 13, 2020 @05:00PM (#23512688)
Whenever I think about Rust vs C I think of Curl, where they've been working on a C program for decades that is used by an incredible amount of software, and they're still fixing memory leaks in it as recently as November 2019: https://curl.haxx.se/changes.html#7_67_0
Re:Microsoft: Rust Is the Industry’s ‘Best Chance’ at Safe S... by dagmx on Saturday June 13, 2020 @05:45PM (#23513047)
Rust considers memory leaks as safe. However I do find it easier to avoid memory leaks in Rust due to it’s stronger scope based dropping than when I write C.
Re:Microsoft: Rust Is the Industry’s ‘Best Chance’ at Safe S... by kahlonel on Saturday June 13, 2020 @08:10PM (#23513980)
You can leak memory in Rust too.
Re:Microsoft: Rust Is the Industry’s ‘Best Chance’ at Safe S... by saagarjha on Saturday June 13, 2020 @02:35PM (#23511558)
I think that bar is met by some term which means something synonymous with "this is better than C". When dealing with "correctness" I generally would like the program to do what I intended.
Re:Microsoft: Rust Is the Industry’s ‘Best Chance’ at Safe S... by bilkow on Saturday June 13, 2020 @04:46PM (#23512553)
I agree, and sincerely, I'm a Rust programmer and "memory safety" is definitely not why I use Rust. There are lots of memory safe languages but I feel more productive and get more satisfaction writing Rust than, say, Python, Lua or C++.

In Rust I feel like almost every time the program works on the first time it compiles successfully, even without writing tests. Probably a combination of very well designed API, builtin RAII, very explicit syntax, compiler strictness and clear docs. I also cannot forget to handle errors (even if I just decide to propagate or crash).

This is what "correctness" means to me, but it isn't exactly enforced by the compiler itself.

Re:Microsoft: Rust Is the Industry’s ‘Best Chance’ at Safe S... by m0xte on Saturday June 13, 2020 @02:44PM (#23511642)
The bar is set by the worst programmer not the worst language.
Re:Microsoft: Rust Is the Industry’s ‘Best Chance’ at Safe S... by MayorMonty on Saturday June 13, 2020 @02:51PM (#23511695)
The language works for the programmer. Those with a higher focus on safety (like rust) make the worst programmer better.
Re:Microsoft: Rust Is the Industry’s ‘Best Chance’ at Safe S... by albntomat0 on Saturday June 13, 2020 @02:59PM (#23511756)
Combined with the large number of vulnerabilities in mature, well-designed programs implemented by skilled programmers. The mythical programmer that can use C/C++ without bugs doesn't exist.
Re:Microsoft: Rust Is the Industry’s ‘Best Chance’ at Safe S... by m0xte on Saturday June 13, 2020 @03:00PM (#23511769)
The mythical programmer that can use Rust without bugs doesn’t exist either. I deal with higher level languages than rust and we’re capable of writing just as dangerous stuff through implementation errors.
Re:Microsoft: Rust Is the Industry’s ‘Best Chance’ at Safe S... by albntomat0 on Saturday June 13, 2020 @03:16PM (#23511892)
While bugs like logic errors clearly can exist in all languages, those that do things like memory management/enforce memory safety for the programmer eliminate whole classes of bugs.

No language/tool/etc will stop all programmer mistakes, but they can definitely stop some.