4 ms·
My guess? There have been a few high profile security CVEs lately and the "why are we still using C" crowd is louder than usual. Ada's a viable alternative for
by spauldo 3y ago
My guess? There have been a few high profile security CVEs lately and the "why are we still using C" crowd is louder than usual. Ada's a viable alternative for performant system code, and it's kind of the underdog to Rust.
- nicce 3y agoAda is not memory safe language tho, while it might make it a bit harder to introduce those bugs.
- ajdude 3y agoAda is memory safe if you just work with the stack or avoid Unchecked_Deallocation. Since functions can allocate and return entire arrays and other data structures completely on the stack, you don't need to mess with the heap that often (and when you do, you can also define your own memory pools). If you have to use dynamic allocation, you could also use the built in container libraries or controlled types for additional safety. Though if you want the kind of memory safety that Rust has, there's always SPARK (a subset of Ada).
- bluGill 3y agoIs there a free version of SPARK? Proven correct code appeals to me, but I don't enjoy trying to get anything past purchasing.
- ajdude 3y agoSPARK is free by default, and readily available. You can use it as-is in ada by adding " with SPARK_Mode => On" to your code; here's some examples: https://learn.adacore.com/courses/intro-to-spark/chapters/01_Overview.html#a-trivial-example https://learn.adacore.com/courses/intro-to-spark/chapters/01... You can install gnatprove with alire via "alr install gnatprove"