5 ms·
> If you want full function? Just don't pass/use anything that's mut. Not quite. There are still mutable globals (they just have to have to have the appropriat
by mmirate 8y ago
> If you want full function? Just don't pass/use anything that's mut.
Not quite. There are still mutable globals (they just have to have to have the appropriate "I'm MT-safe" marker traits); and there's nothing preventing any function from performing any I/O that it desires. Even better, once specialization lands, generic trait-functions will be able to behave differently when called on different types, even if the special behavior isn't valid given only the public type-signature's assumptions.
- xiphias 8y agoWhat's a bit funny is that most of the work on parallizing the Rust compiler is taking out the globals (and moving everything to cached query infrastructure). I think it would improve the Rust language if anything that gets in the way of multi-threading would have to be marked unsafe