Arrays / collections with literal syntax - fixed size?

itsme213 itsme213 at hotmail.com
Sun Jan 6 21:38:32 UTC 2008


"Randal L. Schwartz" <merlyn at stonehenge.com> wrote

> itsme213>         footer: (OrderedCollection with: 1 with: 2))
>
> What are "1" and "2"?  There's too much magic happening here.

Replace them with anything else. The point was
  OrderedCollection with:.. vs. [ ... ]
or Dictionary ... or {..}asDictionary vs. {a=>b, c=>d}

All in the context of painless light-weight DSL-like expression. Even the 
simple [optional "self"] makes quite a difference.

Don't misunderstand, I would find it hard to give up the ST image, Seaside 
and kin, and their productivity.

> Generally, if you hit parens, you're probably due for a refactoring.
> Two sets of parens, definitely due.

Nice advice, thanks!

- Sophie






More information about the Squeak-dev mailing list