5 ms·
Ada does, and has better and more clear conventions for "unsafe" programming (pointer arithmetic, conversions, etc) but does it naturally without special keywor
by exitcode00 8y ago
Ada does, and has better and more clear conventions for "unsafe" programming (pointer arithmetic, conversions, etc) but does it naturally without special keywords and esoteric conventions through its package system. Too bad no one will ever give it a chance due to is syntax :(
Rust is nothing but a slapdash C style copy of its semantics.
- habitue 8y ago> Rust is nothing but a slapdash C style copy of its semantics. Rust is a copy of Ada's semantics for dealing with memory unsafe code? Could you provide an example of what you mean? > Ada does, and has better and more clear conventions for "unsafe" programming (pointer arithmetic, conversions, etc) Can you give some examples here of what you mean? I found Interfaces.C.Pointers, but I don't know enough about the language to know if that's what you were talking about
- exitcode00 8y agoI meant Rust is a copy of Ada in general - it does not deal with unsafe programming in the same way. Instead, you do things like instantiate generic packages/procedure like Ada.Unchecked_Deallocation and Ada.Unchecked_Conversion with the specific conversion or heap deallocation procedure you need. So you are forced to be explicit about every unsafe operation by including such procedures and calling such things - but you are not prone to accidents because you got in the habit of wrapping things in perverse "unsafe" blocks every time you meet a well-thought-out restriction of the language.
- Tuna-Fish 8y ago> I meant Rust is a copy of Ada in general Have you ever actually looked at rust? The headline feature of Rust is linear types with checked borrowing, something that Ada does not provide.
- hunt 8y agoPlus Ada has a complicated runtime system that Rust doesn't.
- exitcode00 8y agoExample?