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

deadalnix deadalnix at gmail.com
Sun Dec 9 23:06:54 PST 2012


On Monday, 10 December 2012 at 03:53:04 UTC, Walter Bright wrote:
> 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++.
>

D didn't removed them, it replaced it with better idioms, that 
still allow the valid uses and make bogus uses less likely.

Here we are talking to remove a possibility, without providing 
something better.


More information about the Digitalmars-d mailing list