From: Martin Coxall Date: 2006-10-01T19:12:41+09:00 Subject: Re: "Succinctness is Power", by Paul Graham > > Well, considering that Paul Graham is a Lispnik, I think we can infer > what his definitions of "powerful" and "succinct" in a programming > language are. What would be interesting to me would be where he stands > on the great "Common Lisp vs. Scheme" divide. He's definitely from the Schemer tradition; Favouring recursion over iteration even though Common Lisp is not tail-recursive; Eschewing Common Lisp's powerfool 'Loop' construct because it's not lispish enough; Frequently explaining how using OO, and in especial, CLOS, are simply artifacts of not knowing how to use macros and lambdas properly; Listing a feature set for that 'dream lisp' you're going to create one day which has almost a one-to-one feature parity with Scheme R6RS. > Perhaps more to the point would be a comparison of Lisp, Scheme and > Ruby > as hosts for internal domain-specific languages. Didn't somebody do > that > already? > Down that way lies flamewars, madness and death. I reckon it is sufficient to notice that Scheme is a little too minimalist to be a useful general-purpose language, the relative paucity of Lisp's library ecosystem works against its chances of ever breaking the mainstream and that Matz admits himself to borrowing good things liberally from Lisp(s) just as from Smalltalk and Perl, Ruby's two other formidable forbears. In any case, there's a question about about to what extent you *should* host DSLs internally. It's my feeling that if you want to inline a DSL in your code, make sure that language is still syntactically recognizably a Ruby. Ruby on Rails is a classic example. If you want to create a non-idiomatic, syntactically strange DSL and inline it in your code via abuse of language facilities, that's how you end up with Common Lisp's 'Loop' Macro. It's not good, and it's definitely ugly, as Paul Graham says. Once you cross that line where your DSL is no longer 'a Ruby', create a grammar for it and knock together a parser for it in Racc. Martin