> So unless proven otherwise by the profiler, no need to make use of unsafe code.
> Ada requires explicit use of unsafe code for memory deallocation, but it is not required when using RAII pools.
So, if you want to write hash tables like this without unsafe code, you're in luck: Rust lets you do it!
(As an aside, I keep seeing these fantastical claims about Ada that, when you dig into them, come with the exact same or more restrictive semantics than Rust. Ada is a good language, but it isn't magical, and the region/lifetime/uniqueness systems in Rust actually solve real problems that Ada doesn't have a solution to.)
Ive been looking forward to seeing such a point-by-point comparison of safety features between Rust, Ada, and SPARK. I gave you or someone else involved in Rust the Safe and Secure Ada 2012 book listing those features to help. Just link to it in a reply to me if and when you publish such analyses.
Btw, even if I agree on restrictive semantics, the thing you didnt mention is results where Ada and esp SPARK are immune by default to so many error classes. Rust definitely had it beat on dynamic safety and probably concurrency. However, unsafe programming in SPARK is still quite safer than Rust. :)
Well this just isn't true. You can write a doubly linked list using Rc and Weak pointers and no unsafe code. This is the same as saying you can write a doubly linked list using GC'd pointers.
So unless proven otherwise by the profiler, no need to make use of unsafe code.
Ada requires explicit use of unsafe code for memory deallocation, but it is not required when using RAII pools.
So unless a custom allocator is required, the standard pools can be used.
In Rust even a basic double linked list requires unsafe.
Then there are those that make use of unsafe to try to express code that cannot be proven by the type system, instead of plain memory corruption issues.
Thankfully the core team is against this trend.