Ensuring template argument is descendant of class

H. S. Teoh hsteoh at quickfur.ath.cx
Thu Dec 12 21:53:35 PST 2013


On Fri, Dec 13, 2013 at 06:42:26AM +0100, Brian Rogoff wrote:
> 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.

I vote for this. Good luck convincing Walter, though.


> 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.
[...]

Not to mention such a big change (or such numerous fundamental changes)
would probably introduce new dark corners that then need fixing. :)
Language design ain't easy.


T

-- 
It is of the new things that men tire --- of fashions and proposals and
improvements and change. It is the old things that startle and
intoxicate. It is the old things that are young. -- G.K. Chesterton


More information about the Digitalmars-d-learn mailing list