Rethinking the default class hierarchy: Milestone 1, Week 1

Sebastiaan Koppe mail at skoppe.eu
Wed Sep 29 21:40:11 UTC 2021


On Wednesday, 29 September 2021 at 16:11:24 UTC, Petar Kirov 
[ZombineDev] wrote:
> When is the last time you saw a Druntime, Phobos, or in 
> general, D function that took a `shared` class reference? (Not 
> a completely rhetorical question - I'd be interested to know if 
> people have such instances in their projects.) Outside of 
> `core.sync.*`, `std.concurrency` and `std.parallelism` nothing 
> deals with `shared` classes.

I tend to use the shared annotation a lot in our concurrency 
library. Structs and delegates mostly though, but it has some 
classes as well.

Obviously it is the sane thing to do once you have multiple 
execution contexts with shared state.

I guess not many people have that though.


More information about the Digitalmars-d mailing list