4 ms·
Agreed, the novelty is doing it in the core language (unsafety is opt-in, not the other way around) and without sacrificing performance. Any language that reli
by alkonaut 7y ago
Agreed, the novelty is doing it in the core language (unsafety is opt-in, not the other way around) and without sacrificing performance.
Any language that relies on GC and avoids mutation e.g. by extrmely inefficient data structures (persistent data structures and other immutable data) obviously achieve mostly the same level of safety but at a huge cost.
- pjmlp 7y ago> Agreed, the novelty is doing it in the core language (unsafety is opt-in, not the other way around) and without sacrificing performance. Unsafe code blocks as opt-in in systems languages appeared for the first time in 1961, followed by multiple variations of it since then, far from being a novelty by now.
- alkonaut 7y agoC# for example is unsafe (data races even outside the unsafe blocks) so while opt-out blocks is old, safety apart from where unsafe is quite novel.
- pjmlp 7y agoRust is just as unsafe, because it has data races in external resources and IPC.
- alkonaut 7y agoNo Rust is not “just as unsafe”, it keeps all its unsafety inside specific blocks where the burden to avoid (or handle bad behavior from) e.g. races, type safety or memory management is placed on the developer. In my C# programs I have to handle the risk of races with my head, in the entire codebase. One might argue that “well those small parts of a rust program are as unsafe as the entire C# program” but that would be a completely nonsensical argument so I’m going to give you the benefit of the doubt that’s not what you meant.
- pjmlp 7y agoOnly because apparently you don't make proper use of Dataflow and TPL libraries. Besides, the recent security exploits have proven that it is time to go back into multi-processes, and here Rust doesn't have anything to offer. So one should tune a bit down the tone of labelling all the other languages as unsafe, even managed ones, industry standards like SPARK, or system research languages like ATS.