I am trying to understand the idea behind "shared" typing fully.
If I am only allowed to share objects with another thread if it is typed "shared", doesn't that imply that it should be allocated as shared too and only be allowed to contain pointers to "shared"?
That would be nice, because then a precise garbage collector could choose between local collection scans and global collection scans.
Is this the intended semantics for shared?