https://issues.dlang.org/show_bug.cgi?id=8295
--- Comment #7 from anonymous4 <[email protected]> --- (In reply to weaselcat from comment #4) > on topic: > a shared destructor doesn't really make sense at all, shouldn't shared > objects just have unshared destructors? It means implicit cast from shared to unshared, which required uniqueness, which can't be guaranteed by compiler, so such implicit cast is unsafe. Another classic example is reference counted data that needs to know whether it's shared or not and use atomic arithmetic when needed. Examples above should be rejected at compile time, because they assume the unshared destructor is safe to call on shared data, which is against the design of shared: sharing must be opt-in. --
