Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] Alternatives to sed + awk



On Fri, Mar 11, 2011 at 5:49 PM, Simon Cozens <simon@example.com> wrote:
> On 11/03/2011 04:32, Stephen J. Turnbull wrote:

>> So real attempts at DSLs in Lisp will either display a lot of Lisp syntax, or
>> have a separate lex/parse stage like Maxima does.

> Well, this is exactly my (and chromatic)'s point. People have been throwing
> the DSL label onto things which are clearly not DSLs, and I'd say your example
> is a borderline case. It's a domain specific language for specifying
> loops, sure, *so long as* the content of those loops happens to be LISP code.

No, you're missing my point.  The content of those loops can be anything that
you've written a semi-DSL for, at the expense of one pair of parens per DSL
(or so).  If you embed the DSL in the loop macro, you can dispense with its
parens, too.

> The most I'm prepared to say is that it's a DSL for a domain that's so incomplete
> that you can't do anything useful with it at all.

You're taking a toy example wa-a-ay too seriously.

> When the Ruby folks say "we can write DSLs without a parser", what they mean
> is option (b), "we can write DSLs that display a lot of Ruby syntax without a
> parser", and therefore what they're actually saying is "we can write subroutines."

Hm.  I guess I have to be a little careful, then, because of course
any Lisp macro *is*
a toy parser (or in the case of the loop macro, a bit beyond the "toy" level).


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links