Thread overview
99 bottles of compile-time beer
Aug 11, 2006
Don Clugston
Aug 11, 2006
Lionello Lunesu
Aug 11, 2006
Walter Bright
Aug 11, 2006
Fredrik Olsson
Aug 11, 2006
Walter Bright
August 11, 2006
My D metaprogramming version of this code has just been posted. Useless, but fun. Enjoy.

http://www.99-bottles-of-beer.net/language-d-1212.html

Compile with: dmd -c -o- beer.d

(Compare with the highly-rated C/C++ preprocessor version, which isn't even correct (it gets the capitalisation of 'no more' wrong in the second last verse)).
August 11, 2006
Excellent! This example serves as a pretty good documentation for D templates ; )

L.


August 11, 2006
Don Clugston wrote:
> My D metaprogramming version of this code has just been posted. Useless, but fun. Enjoy.
> 
> http://www.99-bottles-of-beer.net/language-d-1212.html
> 
> Compile with: dmd -c -o- beer.d
> 
> (Compare with the highly-rated C/C++ preprocessor version, which isn't even correct (it gets the capitalisation of 'no more' wrong in the second last verse)).

This is totally cool. Thanks!
August 11, 2006
Don Clugston skrev:
> My D metaprogramming version of this code has just been posted. Useless, but fun. Enjoy.

Respect! And as Lionello said, this is a good example to learn from as well. So I can not agree on the "useless" part.

// Fredrik Olsson
August 11, 2006
Fredrik Olsson wrote:
> Don Clugston skrev:
>> My D metaprogramming version of this code has just been posted. Useless, but fun. Enjoy.
> 
> Respect! And as Lionello said, this is a good example to learn from as well. So I can not agree on the "useless" part.

I agree. It makes a nice presentation piece.