[squeak-dev] [Squeak protocol] Proposal: Interval>>#@

Christoph Thiede christoph.thiede at student.hpi.uni-potsdam.de
Fri Aug 9 19:55:15 UTC 2019

Hi all,

in a recent project, we introduced a shorthand for creating rectangles:

As applying @ on two numbers converts them into a point, I think it would be
somehow analogical to apply @ on two ranges to convert them into a
rectangle. Above all, I experienced enough cases where I personally find it
much more convenient to create a rectangle using
(2 to: 4) @ (3 to: 6)
instead of
2 @ 3 corner: 4 @ 6.

On the other hand, it is a bit weird that [(2 to: 4) @ (3 to: 5)] would
produce a different output than [(2 to: 4) asArray @ (3 to: 5)]. But imho
the rectangle construction would just be more intuitive. In general, are
there any real senders of SequenceableCollection>>#@ which could not just
call [aCollection with: anotherCollection collect: #@]?

Looking forward to your opinions :)


Sent from: http://forum.world.st/Squeak-Dev-f45488.html

More information about the Squeak-dev mailing list