[squeak-dev] #<-

David T. Lewis lewis at mail.msen.com
Sun Dec 15 18:54:37 UTC 2019


On Sat, Dec 14, 2019 at 07:59:43PM +0000, Thiede, Christoph wrote:
> Hi all,
> 
> 
> Vivide has the following small Object extension:
> 
> 
> <- anObject
> ^ anObject -> self
> 
> 
> I find it quite useful for reasons of symmetry.
> 
> 
> Killer feature:
> 
> #(one two three) withIndexCollect: #<-
> 
> 
> How would you think about integrating it into Trunk? :-)
> 

>From the perspective of reading and cemprehension, I find it
easier to read this:

  #(one two three) withIndexCollect: [ :e :i | i -> e ]

Why? Because I already understand what is meant by #-> and
I can directly read the expression without needing to check
the meaning of #<-. So for me it is slightly more verbose,
but faster to read and easier to understand.

Also, while it is easy to add something to Object, it is
extremely difficult to take it out later. Nice features like
this tend to accumulate over time, and eventually make the
system harder to understand. Have a look at Morph for a
notorious example :-)

Dave



More information about the Squeak-dev mailing list