Test expectation language (was Re: [squeak-dev] The Inbox: CollectionsTests-dtl.209.mcz)

Chris Muller asqueaker at gmail.com
Sun Jan 5 22:28:50 UTC 2014


>> It's one of the few things I actually _like_ about Ruby, that RSpec
>> has such a nice DSL. I'm not a huge fan of Cucumber (it's possible the
>> next few months will either make me hate or love it yet: it's in heavy
>> use at my new job), so I'm not talking about a language completely
>> different to the host language. It's just that, sometimes, like here,
>> I miss Ruby's implicit receivers.
>
>
> Weird. That's the thing I dislike about Ruby. It makes it so easy to play
> around with the appearance of code that the Ruby community has become
> obsessed with DSLs. It's gotten to the point that libraries and frameworks
> are designed more with an eye to a cool DSL than to simplicity or
> expressivity or performance.  On the other hand, simply knowing Ruby, the
> language, is no longer sufficient to be able to read code and understand it,
> you also have to know the semantics of the DSL being used. Since they're
> never documented, that means reverse engineering (without a decent debugger)
> the weird execution environment they've set up to make the DSL work, or
> reading blog posts and mailing lists from the last 3 years to find an
> explanation of the DSL.
>
> I much prefer the Smalltalk community's tendency to build layers of
> abstraction, while sticking to idiomatic Smalltalk. DSLs have their uses,
> ... snip...

Yes.  I've always liked how everything we do in Smalltalk is built on
an aggregation of just 3 or 4 concepts, and that's it.  THAT is pretty
slick in itself.  Anything above that is "magic" and should pay
_really_ good ROI to justify its existence (e.g., way more than simply
aesthetics).  Another example I can think of are those new special
inst-vars in Pharo (having trouble remembering the name, "slots?") to
define all sorts of RDBMS-style checks, etc.  I would rather do that
simply via the same few Smalltalk concepts as everything else.
Instantiation, setting state, and message-sending..


More information about the Squeak-dev mailing list