[squeak-dev] [Squeak protocol] Proposal: Interval>>#@
nicolas.cellier.aka.nice at gmail.com
Sat Aug 10 21:20:13 UTC 2019
In my images i often use xCollection @ yCollection to create a (proxy)
collection of points (for curves).
Le ven. 9 août 2019 à 22:39, Levente Uzonyi <leves at caesar.elte.hu> a écrit :
> On Fri, 9 Aug 2019, Christoph Thiede wrote:
> > 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
> > much more convenient to create a rectangle using
> > (2 to: 4) @ (3 to: 6)
> @ is not intuitive at all. Why would one expect to get 2 @ 3 corner: 4 @ 6
> instead of 2 @ 3 extent: 4 @ 6?
> Also, why not just use #rect:? The comment says "This is the most general
> infix way to create a rectangle.".
> > 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 :)
> > Best,
> > Christoph
> > --
> > Sent from: http://forum.world.st/Squeak-Dev-f45488.html
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Squeak-dev