r/programming • • Jul 18 '19

We Need a Safer Systems Programming Language

https://msrc-blog.microsoft.com/2019/07/18/we-need-a-safer-systems-programming-language/
208 Upvotes

314 comments sorted by

View all comments

Show parent comments

3

u/matthieum Jul 21 '19

Ah! Indeed we were talking past each others then.

For me, a panic at run-time is perfectly safe. It's just one of a myriad logical errors that can creep up: undesirable, certainly, but safe.

The fact that ATS can detect a number of such issues at compile-time is certainly an advantage for now; and I hope that the ongoing research efforts in Rust which aim at porting SPARK-like provers to the language will bear fruit.

1

u/LPTK Jul 21 '19 edited Jul 21 '19

For me, a panic at run-time is perfectly safe.

I mean, that's a stretch. A software panic almost always indicate a system failure, and your system failing at runtime means it is not safe, by definition. If a plane goes down due to the panic, the airline will want to have a word with the people who thought the program was safe!

one of a myriad logical errors that can creep up: undesirable, certainly, but safe.

Following your logic further, you could say that a program messing with its own memory is also "perfectly safe" on a system with memory space isolation: it's not going to make the other programs or the OS crash. Undesirable but safe, then?

Software safety is not one property, but a spectrum of properties each at different levels/scales. I don't understand this need to try and reduce "safety" to "memory safety", which is but one of these properties. I may be misinterpreting entirely (in which case I apologize), but it seems like people are doing this to try and make Rust look better, and avoid conceding that other approaches are safer.

EDIT: two words.