[squeak-dev] smalltalk evolution
info at tomsik.cz
Wed Jun 1 09:19:20 UTC 2011
yes, sorry for that - every time I see binary message (<~, and even <=) I
start wondering about
& searching for what does it mean.
which is exact opposite of what I want to do. code (action) should express
what will happen.
I don't want to be extra curious about details - if codes says it will
work, I trust it.
refactoring note - your class should not depend on return value, but
rather on double-dispatch
(allowing you to extend what can be dropped to GenericInputMorph even
without touching it)
so test for isNil is IMHO wrong way of doing it as well as need for <~
>> 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
> 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
> 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 ?
More information about the Squeak-dev