Ensuring template argument is descendant of class

Brian Rogoff brogoff at gmail.com
Thu Dec 12 21:42:26 PST 2013


On Friday, 13 December 2013 at 05:22:26 UTC, Ross Hays wrote:
>> Yeah, is-expression syntax is one of the dark, ugly corners of 
>> D that
>> unfortunately we're stuck with, because changing it now will 
>> totally
>> break a LOT of code for merely cosmetic reasons. I honestly 
>> wish that
>> one day this mess could be cleared up, though I'm not holding 
>> my breath
>> for it.
>>
>>
>> T
>
> I know this is probably obvious, but if D were allowed to just 
> make one big breaking change for D3 or something, and fix every 
> dark corner it has. Would that really be so bad? I know it 
> would break things but... I kind of long for it.

I'm sympathetic to this POV, or something similar. For example, a 
multiyear plan to deprecate the 'is' syntax and replace it with 
something better, in the current D. I'm not a fan of gratuitous 
changes which make the language unstable, but if there were a 
pleasing design to replace 'is' I'd like to think that D users 
could change the relevant sources given a long enough deprecation 
window.

Changing every dark corner and every poor choice is too much. For 
instance, a lot of people think that immutability and 'nothrow' 
should have been the default, but changing that would be dramatic 
and probably will have to wait for a D3 or new language.

-- Brian


More information about the Digitalmars-d-learn mailing list