4 ms·
I don't see why people take "Rust has affine types" and "affine types help us have safe systems programming" and then think "Rust is the only safe systems progr
by crazypython 6y ago
I don't see why people take "Rust has affine types" and "affine types help us have safe systems programming" and then think "Rust is the only safe systems programming language."
- deleted 6y ago[deleted]
- Ar-Curunir 6y agoWhat are some other memory-safe languages that occupy the same position in the trade-off space as Rust?
- crazypython 6y agoD with its borrow checker. D has a GC- yes- but that merely gives you the option of having tracing delete your memory. You can manually free GC memory and have it freed through RAII.
- Ar-Curunir 6y agoUm, how is that better than Rust, which has better integration of, and soundness for its borrow checker?
- carapace 6y ago"best chance" not "only" FWIW, I suspect C with proper tools is fine, just fine. Also Ada is still a thing.
- fluffything 6y agoBecause people like you, who suggest that there are alternatives, fail to mention them. Which other languages close to C, without a run-time, and without a garbage collector, give you proven memory and thread safety? Not C, not C++, not D, not Nim, not Go, not Swift, not Ada, ...
- jfkebwjsbx 6y agoC and Ada variations have done so for many years, way before Rust was a thing. Ada and D are also in the process of adding memory safety to the base language too. The actual question is why nobody cared that much until now to put it in mainstream languages. The answer is, as you know, browsers.
- AnimalMuppet 6y agoWhat C variations have given safe system programming for many years? I'm not sure I know of any.
- pnako 6y agoMISRA C is a subset of C / set of rules that is used in the auto industry, and supported by many tools.
- joshuamorton 6y ago> Rule 20.4 (required): Dynamic heap memory allocation shall not be used So anyway, what subset of C allows the use of dynamic heap memory allocation and enforces safety?
- fluffything 6y ago> MISRA C is a subset of C / set of rules that is used in the auto industry, and supported by many tools. That's true, and I know you are not claiming this, but MISRA C is neither memory nor thread safe, which is what we are talking about here. Writing MISRA C code with data-races is trivial, and no "linter" for it finds those.
- fluffything 6y ago> C and Ada variations have done so for many years, way before Rust was a thing. Not giving any concrete examples is just proving my point. Which C variations are both thread and memory safe? Which Ada variations are both thread and memory safe ? AFAIK, such variations do not exists, and people claiming that they do on the internet and then failing to provide a simple link when requested multiple times by others to do so just seems to confirm that.