Bragging about Unix and D

Sean Kelly sean at f4.ca
Thu Aug 24 08:48:18 PDT 2006


Oskar Linde wrote:
> Sean Kelly wrote:
>> Tom S wrote:
>>>
>>> template table(int i = 0) {
>>>     pragma (msg, row!(i));
>>>
>>>     static if (i+1 < height) {
>>>         mixin .table!(i+1) table;
>>>     } else {
>>>         alias void table;
>>>     }
>>> }
>>
>> Huh, now there's a use for mixin I can appreciate.  Nice work.
> 
> but s/mixin/alias/ will work just as well. :)

True :-)  Though this got me thinking again about iterative code 
generation in D--I've been too occupied with other things to get fancy 
with template programming recently.  Working arount ITI limitations is 
about the extent of it.


Sean



More information about the Digitalmars-d mailing list