DMD 1.031 and 2.015 releases

Robert Fraser fraserofthenight at gmail.com
Thu Jun 19 13:50:27 PDT 2008


Russell Lewis Wrote:

> Robert Fraser wrote:
> > Jason House wrote:
> >> Walter Bright wrote:
> >>
> >>> Some new stuff to make writing templates easier.
> >>>
> >>> http://www.digitalmars.com/d/1.0/changelog.html
> >>> http://ftp.digitalmars.com/dmd.1.031.zip
> >>>
> >>> http://www.digitalmars.com/d/2.0/changelog.html
> >>> http://ftp.digitalmars.com/dmd.2.015.zip
> >>
> >> Why is "alias" required when specifying a template parameter?  It 
> >> seems like
> >> the most accepting and general case.  Why wouldn't it be the default?
> > 
> > Really? I have never had a use for an alias parameter (although I guess 
> > most types could work as alias parameters) except using an un-speced 
> > trick with regards to their name mangling. They seem way to permissive.
> 
> One great example of alias parameters is when you want to pass another 
> template name as a parameter.  You can build a foreach() template, 
> operating over a Tuple, which passes each element in the Tuple into some 
> other template.

I'm not saying they're not useful ;-P. I'm just saying that they're used
rarely enough that making them the default is not a good idea.


More information about the Digitalmars-d-announce mailing list