Is metaprogramming useful?

Sean Kelly sean at f4.ca
Wed Nov 29 06:00:34 PST 2006


renoX wrote:
> == Extrait de l'article de « Brad Anderson (brad at dsource.org) »
>> Poor Lisp.  [cut]  I am more amazed at how such a valuable toolset is
>> consistently under-used and its functionality is rewritten from scratch.
> 
> Well, I'm not surprised myself: Lisp syntax is not user-friendly, people wants to
> use language with easy-to-read syntax, not a language with an abstract-syntax-tree
> syntax. So in all likelihood Lisp will stay mostly unused in the future.
> 
> Back on the subject of metaprogamming, one thing which makes me cautious about
> metaprogramming is debugging: when there is a problem debugging generated code is
> a nightmare usually..

It's gotten pretty good in C++ and will get better with concept 
checking.  And D is already better at reporting compile-time errors, 
since we have the use of static if, static assert, and pragma(msg). 
Once we get an instantiation trace when static asserts fail I think 
we'll be in good shape there.  Run-time template debugging is obviously 
a bit behind, but that's only a matter of time.


Sean



More information about the Digitalmars-d mailing list