[Pharo-dev] Rationale behind the "ifTrue:/ifFalse: returns instead of and:/or:'s" rule

John Brant brant at refactoryworkers.com
Fri Apr 7 09:32:43 EDT 2017


> 2) I just want to know why someone created such rule :). Because the author of the last update of the initialize method is Marcus :)

Probably to stop people from writing code like this:

	(borderColor isColor and: [ borderColor isTranslucentButNotTransparent ]) ifTrue: [ ^ true ].
	^ false

instead of:

	^borderColor isColor and: [ borderColor isTranslucentButNotTransparent ]

:)


John Brant



More information about the Pharo-dev mailing list