Time to kill T() as (sometimes) working T.init alias ?

Walter Bright newshound2 at digitalmars.com
Sun Dec 9 19:52:15 PST 2012


On 12/9/2012 2:10 PM, Jonathan M Davis wrote:
> You're basically suggesting that we disallow any idiom which requires that
> structs be deep copied, and I think that that's bad policy. It's one thing to
> encourage programmers to not write such structs and to use other idioms like
> COW or reference counting. It's another thing entirely to disallow them. It's
> one of C++'s prime tenets to try and not force the programmer to program in a
> certain way or in a certain paradigm, and I think that D should do the same.

We already disallow several C++ idioms - like multiple inheritance, using a type 
as both a value and a reference type, and head const. We believe that these are 
bad design patterns, despite them being used often in C++.

I do not dispute that deep copy is commonly used in C++. I challenge the idea 
that it is a good design pattern, i.e. better than using copy-on-write.



More information about the Digitalmars-d mailing list