On Thu., 18 Oct. 2018, 5:05 am Patrick Schluter via Digitalmars-d, < digitalmars-d@puremagic.com> wrote:
> On Wednesday, 17 October 2018 at 22:56:26 UTC, H. S. Teoh wrote: > >> If something might be used by someone else it's better not to > >> touch it, unless one has confirmation it is not used by > >> someone else. > >> > >> This is what shared has to enforce. > > > > Yes. But how can the compiler statically verify this? Because > > if it cannot be statically verified, then somewhere along the > > line we have to trust the programmer. Ergo, it's programming by > > convention, and we all know how effective that is. > > > and that is exactly what shared is currently doing. Adding the rw > restriction at least adds a protection for inadvertantly changing > a shared object, a thing that doesn't exist now. > > What cracks me up with Manu's proposal is that it is its > simplicity and lack of ambition that is criticized the most. > shared is a clusterfuck, according to what I gathered from the > forum, I never had yet to use it in my code. Manu's idea makes it > a little less of a clusterfuck, and people attack the idea > because it doesn't solve all and everything that's wrong with > shared. Funny. > Elaborate on this... It's clearly over-ambitious if anything. What issues am I failing to address? I'm creating a situation where using shared has a meaning, is safe, and doesn't require any unsafe interactions, no casts, etc, for users at any level above the bare metal tooling... How would you improve on that proposition? >