Shared - Another Thread

Stefan Koch uplink.coder at googlemail.com
Wed Oct 17 23:13:08 UTC 2018


On Wednesday, 17 October 2018 at 22:56:26 UTC, H. S. Teoh wrote:
> On Wed, Oct 17, 2018 at 10:13:37PM +0000, Stefan Koch via 
> Digitalmars-d wrote:
>> On Wednesday, 17 October 2018 at 21:55:48 UTC, H. S. Teoh 
>> wrote:
> [...]
>> > But nobody will be building a fusion engine out of race 
>> > conditions anytime in the foreseeable future. :-D
> [...]
>
>
>> It's still valid though.
>> 
>> 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.
>
> [.... or it will lead] to an overly-restrictive conservative 
> type system that nobody will use.
>

I'd rather wear 5 virtual straight-jackets than spending the rest 
of my life trying to observe invisble races, and wearing a real 
one.

Stefan


More information about the Digitalmars-d mailing list