Info on Smalltalk DSLs or Metaprogramming...

Ramon Leon ramon.leon at allresnet.com
Wed Aug 30 17:39:18 UTC 2006


> Part of the problem is different people seem to have 
> different interpretations of what a DSL is. In some 
> definitions, any significantly complicated project becomes a 
> DSL (or at least any well- written project). 

This is the definition I think most of us have.  We should be more explicit
and call them embedded DSL.

Lispers write DSL's with macro's, bending lisp to the problem domain, but
it's still valid Lisp.  Smalltalker's write DSL's with blocks and Objects,
also bending the language to the problem domain, but it's still valid
Smalltalk.  There's value in making a distinction between a DSL, and an
embedded DSL, Lispers and Smalltalkers generally mean embedded DSL when they
say DSL.  They're talking about extending the language, as is, without
changing it's syntax.

> When I spoke about DSLs, I was particularly talking about 
> reading in and evaluating text files. 

I don't think that is a good definition of a DSL.  Files are orthogonal to
the issue of DSL or not DSL.  You seemed hell bent on using a syntax that
wasn't valid Smalltalk, and I understood you pretty much as Ralph did, and
wondered, why?  Yes, this is building a DSL, but it's building a custom DSL
that requires parsing.  While a valid approach, it's certainly not the
easiest or most practical solution, which is all the Smalltalkers were
getting at.  Even if you did want to build a custom DSL, the practical
approach would be to prototype it as an embedded DSL first, get it working,
and then decide after that, if a custom syntax would be useful.  Just my
$.02




More information about the Squeak-dev mailing list