3 ms·
I meant the commenter as the example of mainstream audience that acts like other things didn't do it first. Wasn't sure what Rust's official position was. Thank
by nickpsecurity 11y ago
I meant the commenter as the example of mainstream audience that acts like other things didn't do it first. Wasn't sure what Rust's official position was. Thanks for link as I'll keep it in mind for future discussions. :)
Note: Strange that they draw no inspiration from Ada despite it countering many issues by design. I figure at least its tactics if not syntax would be a nice start on a new language. Least they borrowed from and built on a lot of good ones, though.
- kibwen 11y agoAda actually takes a different approach to memory safety than Rust. Ada requires garbage collection if you want to dynamically allocate, and only statically ensures safety without a GC if you opt into the subset where only static allocation is allowed. Ada also has at least one correctness-aiding feature that Rust lacks, which is the ability to define integral types with an explicitly bounded range.
- nickpsecurity 11y agoThe consistent point, as I mentioned, is that Rust isn't the first, safer, systems language. There's quite a few before it. It does take a different approach and I like Rust's innovations in this space. I'm keeping a distance for now to let it and the associated coding styles evolve. Just reading the experience reports, articles, HN comments, etc for now. Also watching Julia as it has a host of good features with potential to take on Python and R at same time. Especially macros and painless C calls. Note: Btw, good call on integral types. That's quite beneficial. Also, existential types would prevent all sorts of issues that happen when two things are same size but should be treated differently. Like a mi-to-km mismatched that was a downer for one program in particular. ;)
- kibwen 11y agoI agree, Rust isn't the first language to exist in the "safe systems language space". But it's a recurring meme that Rust is somehow related to Ada, when in reality they are divergent lineages. :) > Also, existential types would prevent all > sorts of issues that happen when two things > are same size but should be treated differently. I don't know what existential types are, but we use phantom types for that: https://blog.mozilla.org/research/2014/06/23/static-checking-of-units-in-servo/ https://blog.mozilla.org/research/2014/06/23/static-checking...
- nickpsecurity 11y agoOh, I didn't know about that meme. Explains your reaction to my post. Oh no, mine is more meme that people ignore what exists and miss potential benefits (or just accuracy) for various reasons. So, a consideration of safe, systems programming should include most mature tools (eg Ada) plus any newcomers reaching maturity (eg Rust). I wasn't implying Rust had any connection to Ada: more surprised Ada had no influence on it than anything. I'll be sure to look out for that other meme, too, to call them on their BS. ;) "I don't know what existential types are" Unfortunately, I couldn't find a non-dense explanation of it that had relevant detail. Good news is the Ada book I've been referencing has a great explanation with examples. See Ch 2 "Safe Typing" for the answer in the first, two pages. They call them "Distinct Types" in there (shrugs). Included link to whole book in case you see safety tactics worth copying. http://www.adacore.com/knowledge/technical-papers/safe-secure/ http://www.adacore.com/knowledge/technical-papers/safe-secur... So, they make sure the types and implementation are separate so unique types ("existential types") can catch interface issues that can be subtle and nasty. Casts work around them where necessary while making the risk more obvious. Aim to try to keep overhead down compared to heavy OOP + regular types. Seeing it made me wonder, "Why don't the rest have this!?" "but we use phantom types for that" Thanks for the link! Adding it to my list of things to read and review. :)