DConf 2013 Day 1 Talk 2: Copy and Move Semantics in D by Ali Cehreli

Dicebot m.strashun at gmail.com
Thu May 16 04:06:18 PDT 2013


On Thursday, 16 May 2013 at 10:41:51 UTC, Regan Heath wrote:
> True, it's not enforced.  But, that's because the 
> responsibility lies with the caller, and I think this is a 
> reasonable position to take in these cases (std.file methods 
> which use but do not retain the argument post-call)

You see, if it is not enforced, than no one has any real 
responsibility. Multi-threading based on convention has been used 
quite a lot in C/C++ according to my experience it sucks. D 
developers has done a lot of work in pursuing type system that is 
aware of multi-threading and can make certain enforcements / 
provide guarantees. It makes no sense to stop in the midway.

One of D slogans I remember was "Safe by default, efficient when 
needed". This is exactly one of such cases. Any type contract 
should be stated explicitly. Everywhere.


More information about the Digitalmars-d-announce mailing list