Info on Smalltalk DSLs or Metaprogramming...
rwmlist at gmail.com
Sun Aug 20 02:24:19 UTC 2006
On Aug 19, 2006, at 12:51 AM, stéphane ducasse wrote:
> Rich I would suggest you to read the paper on aconcagua and unit
> published at OOPSLA and ESUG last year by hernan Wilkinson.
Thanks, I'll look for this.
> Then I think that you should pay attention about the assumption
> tthat you have regarding the syntax your readers can understand.
> For example I'm skeptical that : is bad for argument. But you will
> tell us.
I never meant to imply that colons were bad. In fact, my "ideal"
syntax would use them. What I meant is, forcing you to use colons at
the end of methods makes Smalltalk a little less flexible. There are
some cases where, it seems to me, the colons would be intrusive.
Particularly in methods that take a single argument.
Let's take the totally hypothetical situation. Say you wanted to
interpret the words "See spot run".
In Ruby, "See" could be an object, "spot" a method and "run" a local
As far as I know, you couldn't interpret the same thing directly in
Smalltalk. You would need to write "See spot: run", which is where
the colons become a problem.
Of course, there are other cases where the colon would come in handy.
Having thought about both languages a lot over the last few days, I'm
pretty sure of the following:
1) Regardless of which language you use, there will be DSL elements
that appear awkward or clunky (provided you do no string processing).
2) Some things will always be easier to write in the other language.
More information about the Squeak-dev