<div dir="auto"><div><div class="gmail_quote"><div dir="ltr">On Thu., 18 Oct. 2018, 5:05 am Patrick Schluter via Digitalmars-d, <<a href="mailto:digitalmars-d@puremagic.com">digitalmars-d@puremagic.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Wednesday, 17 October 2018 at 22:56:26 UTC, H. S. Teoh wrote:<br>
>> If something might be used by someone else it's better not to <br>
>> touch it, unless one has confirmation it is not used by <br>
>> someone else.<br>
>> <br>
>> This is what shared has to enforce.<br>
><br>
> Yes. But how can the compiler statically verify this? Because <br>
> if it cannot be statically verified, then somewhere along the <br>
> line we have to trust the programmer. Ergo, it's programming by <br>
> convention, and we all know how effective that is.<br>
><br>
and that is exactly what shared is currently doing. Adding the rw <br>
restriction at least adds a protection for inadvertantly changing <br>
a shared object, a thing that doesn't exist now.<br>
<br>
What cracks me up with Manu's proposal is that it is its <br>
simplicity and lack of ambition that is criticized the most. <br>
shared is a clusterfuck, according to what I gathered from the <br>
forum, I never had yet to use it in my code. Manu's idea makes it <br>
a little less of a clusterfuck, and people attack the idea <br>
because it doesn't solve all and everything that's wrong with <br>
shared. Funny.<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">Elaborate on this... It's clearly over-ambitious if anything.</div><div dir="auto">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?</div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
</blockquote></div></div></div>