3 ms·
Perhaps one day unsafe programming languages will be forbidden to use.
by speedgoose 7y ago
Perhaps one day unsafe programming languages will be forbidden to use.
- johnr2 7y ago> Perhaps one day unsafe programming languages will be forbidden to use. That would mean ruling out a whole lot of performance-critical software (including that written in unsafe Rust). Be careful what you wish for.
- speedgoose 7y agoI'm quite sure the performance hit will be fine in a few decades.
- fl0wenol 7y agoThat kind of thinking made sense twenty years ago where you could assume Moore's law was going to hold into the next decades.
- speedgoose 7y agoYou don't think we will have budget for a few safety checks?
- jsjddbbwj 7y agoThat's exactly the line of thinking that has made computers much less responsive than they were 20 years ago.
- msla 7y agoEvery programming language capable of expressing arbitrary recursion or looping is unsafe. Doesn't matter what kinds of checks you put in. It might matter what kind of runtime you have, but a runtime isn't a language, is it? We're talking about the language, and any language sufficiently expressive to allow you to say "loop until you are done" instead of "loop precisely 20 times" is inherently unsafe.
- andrewflnr 7y agoIt is not the case that every Turing complete language allows certain inputs to cause the program to break the bounds of the language's semantics and go rampaging through its simulator. That's what unsafe means in the context of memory vulnerabilities. Yes, Rice's Theorem is cool, but so are sound and complete type systems.
- msla 7y agoA "sound and complete type system" can't guarantee termination, and being a Rust zealot won't change that.
- andrewflnr 7y agoCorrect. Fortunately that has nothing to do with memory safety. And where did you get the idea I was a Rust zealot?
- msla 7y agoIt has everything to do with memory safety.
- andrewflnr 7y agoYou don't even need a type system to eliminate memory unsafety. Show me the memory unsafety in lambda calculus. (and don't forget that, as you said, we're talking about languages, not runtimes)
- ksk 7y ago'Banning' things you don't personally like is not a great tactic to convince people. Other technologies should keep making things easier for the C folks to migrate to...
- pjmlp 7y agoBack in 1961 Burroughs introduced an OS, nowadays still sold by Unisys. Guess what, their system language ESPOL, an Algol derivative later replaced by NEWP, already had unsafe code blocks. Binaries that made use of unsafe were tainted and required that the admin would given them permission to execute. This almost 10 years before C was created.