Is metaprogramming useful?

Don Clugston dac at nospam.com.au
Wed Nov 29 07:51:13 PST 2006


Jarrett Billingsley wrote:
> "Brad Anderson" <brad at dsource.org> wrote in message 
> news:ekhh7s$2e7$1 at digitaldaemon.com...
> 
>> Poor Lisp.  It just sits there, 50 years old, debugged, optimized, and 
>> ready
>> to go, while the imperative languages try to inch closer over the decades.
> 
> In that case.. it'd be another interesting experiment to try to come up with 
> a new syntax for Lisp that appeals to more programmers than it does now ;)
> 
> I really can't get past the parentheses.  I know Georg said it's an excuse, 
> but I really, truly cannot understand most Lisp code because I can't tell 
> which right paren out of a group of six is closing which left paren.  I'm 
> sure bracket highlighting in a code editor can help, but why should that be 
> necessary?  I'm sure a good deal of those parens can be stripped out, or 
> replaced by other brackets, or just moved around to get a more algebraic 
> syntax. 

I completely agree. Lisp has a terrible "Hello, World" problem. The 
first Lisp program I saw had a mass of parentheses, and introduced the 
functions 'car' and 'cdr' (The year is 1952, apparently). For a newbie, 
Lisp debugging involves counting parentheses.
The failure of Lisp to gain traction is a great demonstration of the 
importance of syntactic sugar. Poor old Lisp.

Forth was another great language for metaprogramming. Even the language 
primitives were written in Forth, except for a few dozen lines of asm.
Completely unmaintainable, though -- asm is much easier.






More information about the Digitalmars-d mailing list