5 ms·
> whole data structures and algorithms are disallowed Nothing is disallowed in rust. You may need a specialized crate or a small 'unsafe' block to work beyond
by jjnoakes 9y ago
> whole data structures and algorithms are disallowed
Nothing is disallowed in rust. You may need a specialized crate or a small 'unsafe' block to work beyond the compiler's ability to prove your code meets rust's guarantees, but that's not the same as inexpressible.
- quotemstr 9y agoUnsafe rust is a superset of safe Rust. They're two different languages. The OP is saying, correctly, that certain data structures are inexpressible in safe Rust. That's fine. Certain control flow structures are inexpressible in goto-less C.
- jjnoakes 9y ago> The OP is saying, correctly, that certain data structures are inexpressible in safe Rust The op didn't say "safe rust", that's my point.
- irundebian 9y ago> Certain control flow structures are inexpressible in goto-less C. I'm not sure about that. C contains while loops. And every GOTO-computable programs should be expressible by WHILE-computable programs. See (slide 21): http://ai.cs.unibas.ch/_files/teaching/fs16/theo/slides/theory-d03.pdf http://ai.cs.unibas.ch/_files/teaching/fs16/theo/slides/theo...
- stormbrew 9y agoI don't think "certain control flow structures are inexpressible" is the same assertion as "certain programs are unexpressible"... After all, any turing complete system will have a similar set of computable programs as another, but they will not all have the same control structures. For example, you can have a turing complete language with no loops, only recursion. Both can express the same programs but not in the same way. That said, it's also a bit of a tautology so.
- Too 9y agoIs this the same thing as the terms open-world vs closed-world soundness the article uses? I.e the API is sound but it uses unsafe on the inside? I've never heard those terms before.