Message Eating Null - article
Keith Hodges
keith_hodges at yahoo.co.uk
Thu Jul 26 19:54:20 UTC 2007
>
> > > widget setStringValue: #(office phone lastNumberDialed asString)
> > > inject: person into: [:obj :sel| o == nil ifTrue: [ nil ] ifFalse: [
> > > obj sel ] ]
> >
Not being that clever, I find #inject:into: to be the most obfuscated
message in the image. Whenever I see it I have to think quite hard to
work out what is going on.
I was confused long before I got to the block.
The original code has the advantage that it works without me needing to
know how exactly the effect is achieved.
cheers
Keith
More information about the Squeak-dev
mailing list
|