• 4 Posts
  • 5 Comments
Joined 2 months ago
cake
Cake day: August 26th, 2026

help-circle







  • Thanks =) Another thing that will help with path abstraction is “associated groups/paths”, which are like associated types but for groups/paths.

    I think invalidation will work well with concurrency. The more I implement it, the more I’m discovering that invalidation and normal borrow checking are actually kind of the same thing (the difference between them lies elsewhere). So I think it’ll deal with concurrency the same way as normal borrow checking. Specifically:

    • If someone has a reference into some data that is currently being shared to another thread via structured concurrency, they won’t be able to mutate it during the structured concurrency.
    • If someone has a reference into some data that has been moved to another thread, they won’t be able to dereference it because, well, it’s been moved away.

    I’m having trouble putting it all in english, but I feel like a key here is that if a function (or scope?) has no mut effects, then it’s effectively taking an “immutable” reference. From that, all the normal shared-xor-mutable benefits apply.


    score 1 · canonical