C++0x Concepts - Dead?
aarti_pl
aarti at interia.pl
Thu Jul 16 13:42:32 PDT 2009
Jarrett Billingsley pisze:
> Please, the last thing we need is to have *two* systems of template
> specialization, one with best matching and one without.
>
> I was thinking it'd be more intuitive if constraints - which are more
> general - would be used to implement specialization. That is,
>
> template X(T: A, U: B)
>
> would basically be syntactic sugar for
>
> template X(T) if(is(T: A) && is(U: B))
>
> Then you have only a single system of specialization and constraining
> to worry about. How would "best matching" work? The compiler could
> definitely be smart enough to pick apart the logical expression in the
> constraint, I suppose, or constraints could be written as "if(c1, c2,
> c3)" or something of the like.
>
> Let's try to *simplify* metaprogramming and make things *orthogonal*
> instead of tacking on features with no regard to the existing ones.
Well, that's exactly what I proposed about one year ago:
http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D&article_id=77654
My proposal would make meta programing in D much more intuitive (because
of using rules - not bunch of corner cases as it is today).
Unfortunately almost no one from NG commented on that...
BR
Marcin Kuszczak
(aarti_pl)
More information about the Digitalmars-d-announce
mailing list