DMD 1.031 and 2.015 releases

Russell Lewis webmaster at villagersonline.com
Thu Jun 19 10:57:06 PDT 2008


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.


More information about the Digitalmars-d-announce mailing list