[aida] isNil ifTrue: idiom
j.squeak at cyberhaus.us
Mon Feb 11 16:29:08 CET 2008
Janko Mivšek wrote:
> Dear all,
> Let me first apologize for such an unresponsiveness and a backlog of
> your posts to be answered. I have all of them blue tagged on my
> Thunderbird, so they will be answered, sooner or later. Thanks again for
> your understanding!
Not a problem. I'm sure we all understand that you are a busy man. And
we are quite grateful for what you are able to give.
> isNil ifTrue: instead if ifNil: is used mostly from two reasons:
> historical and portability.
> Historical: back in 1996 there was no ifNil: on VW. This came later,
> first as extensions by some packages and just in recent years as part of
> core image.
> Portability: because of ifNil: is probably still not part of all
> Smalltalks it is just better to avoid it in core Aida.
> But it is also true that I'm used of old method and that I didn't find
> yet a compelling reason to change that habit :)
Ok, sounds reasonable. As one who does not quite go back so far and has
only used Squeak, I am quite fond of ifNil:, and will continue to do so
for personal code.
Like you, I have the habit of using a certain idiom, in my case, ifNil:,
and before I made effort to do differently, I just wanted to know if
there was a reason other than personal preference.
Would you like for any code written for AIDA and all of its composite
libraries to use the isNil ifTrue:? If so, then it would be good to add
this to the coding convention page.
More information about the Aida