Bug? Inconsistency?: false ifTrue: [] ==> nil
Bert Freudenberg
bert at isgnw.CS.Uni-Magdeburg.De
Wed Jan 26 11:49:38 UTC 2000
On Wed, 26 Jan 2000, Henrik Gedenryd wrote:
> Now the body has to be:
>
> | changed |
> changed _ self tryToTransformNode.
> changed ifTrue: [
> [self tryToTransformNode]
> whileTrue].
> ^changed
>
> You can use and:, but this makes the code less clear:
>
> ^self tryToTransformNode and: [
> [self tryToTransformNode]
> whileTrue.
> true]
How about this?
self tryToTransformNode ifFalse: [^false].
[self tryToTransformNode] whileTrue.
^true
Seems simpler and more clear to me.
-Bert-
More information about the Squeak-dev
mailing list
|