3 ms·
I pretty strongly disagree with this. Rust doesn't replace all of C++; it only replaces some. Specifically, there's not a great reason to write a compiler in a
by adgjlsfhk1 4y ago
I pretty strongly disagree with this. Rust doesn't replace all of C++; it only replaces some. Specifically, there's not a great reason to write a compiler in a language with manual memory management. HPC is also starting to move to higher level alternatives like Julia.
Also AUTOSTAR/MISRA are funny to bring up because they are desparate and only semi-successful attempts to bring a semblance of safety to fundamentally unsafe languages. You get all of the safety of them (and more) in Rust with the 2 rules of 1. don't use unsafe. 2. have tests.
- pjmlp 4y agoJulia is implemented in C++, and makes use of LLVM, written in C++. Apparently AUTOSAR and MISRA are relevant enough for Rust, that efforts are being made to allow a Rust certification subset as well.
- adgjlsfhk1 4y agoJulia isn't primarily implemented in C++. Most of the implementation is in Julia (68%). About 25% is C/C++, but that could be changed if someone wrote a good enough compiler in a fast enough memory safe language. The rest is in a custom scheme dialect (femptolisp) and is in the process of being replaced by Julia (see JuliaSyntax.jl).
- pjmlp 4y agoWaiting for the LLVM rewrite in Julia.
- adgjlsfhk1 4y agoI'm hoping we get there. LLVM has really good codegen, but I think we can probably do a better job on the optimizer side than they do. Don't expect anything soon though. Replacing LLVM is (kinda obviously) a ridiculously huge project.
- pjmlp 4y agoIt would be interesting to see it happening.