[squeak-dev] smalltalk evolution

Stéphane Rollandin lecteur at zogotounga.net
Wed Jun 1 09:01:29 UTC 2011


> I'm not saying they're not useful, but they're usually part of some
> internal DSL,
> why not introduce full-blown DSL? (for math, func programming, whatever
> else)

It is not clear to me what you call DSL here. In a dynamic language such 
as Smalltalk I do not see a clear distinction between a DSL and a protocol.

As for the package I linked to, I use it extensively in my main project 
(muO) so it doesn't feel like a DSL to me at all: it just implements 
functions as objects and make it easy to use them.

Here is a code example:


GenericInputMorph>>acceptMorph: aMorph
	"Sent by the drop reporter."

	morphTest ifNotNil:
		[(morphTest <~ aMorph) ifFalse: [^ self]].

	textPane setText: (((self morphicLambda <~ aMorph)
			ifNil: [^ self]) <= m) lambdaStoreString.
	morph := aMorph.
	dropReporter smallLabel: aMorph name.
	textPane hasUnacceptedEdits: true


Do you see a DSL there ?

Stef



More information about the Squeak-dev mailing list