[ANSI-Smalltalk] Re: A list of interesting methods, ifNotNil:
Paolo Bonzini
bonzini at gnu.org
Thu Sep 4 06:36:07 BST 2008
> There seem to be three reasons for leaving [ifNil:][ifNotNil:]
> out:
> (1) No agreement about the optional argument in the not-nil
> block; of course the standard could cover just the no-
> argument case.
The standard can force implementation to support both cases. That's
slowly becoming the standard.
> (3) Where do you stop? Once you have these, why not
> b1 while[Not]Nil[: b2]? Why not ifEmpty:ifNotEmpty:?
> This is actually a serious question; I've wanted
> b1 whileNotNil: b2 often enough.
I think Squeak has ifEmpty:ifNotEmpty: but I agree that...
> these methods _are_ common practice and those aren't."
Paolo
More information about the ANSI-Smalltalk
mailing list