@jorendorff I have a dumb Rust question... Does the "no mutable aliases" rule mean I cannot "soundly" use Rust instead of C++ for all my programming tasks? It'd be simplifying if I knew in my head I could always replace C++ with Rust for all use cases.
-
Show this thread
-
Replying to @cdleary @jorendorff
I mean, they’re both Turing complete. You can do any task in Rust you can do in C++. You just may not be able to do it the exact same way, though. e.g. you might have to use indices, or reference counted pointers, instead of graphs with direct pointers.
1 reply 0 retweets 2 likes -
Replying to @pcwalton @jorendorff
I ack that's true for the abstract computational definition of task, but my definition is more like "somebody hands me two may alias objects from an existing system, do I then have to use C++" sort of deal.
1 reply 0 retweets 0 likes -
Replying to @cdleary @jorendorff
Well, obviously that’s not true, because there are GTK+ bindings for instance.
2 replies 0 retweets 0 likes -
Replying to @pcwalton @jorendorff
I don't think "obviously" applies here, I had no idea. How do they deal with the "no shared mutable aliasing" constraint?
1 reply 0 retweets 0 likes -
Replying to @cdleary @jorendorff
I’m not super familiar with the GTK bindings, but I think that in GTK you don’t reach inside objects much. Instead you use accessor/mutator functions.
2 replies 0 retweets 0 likes
So the issue only comes up if you’re actually writing GTK+ objects in Rust. In that case you need runtime enforcement of alias xor mutable. There are various ways to do that.
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.