marcus
having rules is the best way to go and potentially create a compatiblity
package if necessary.
I like rules because they help freeing my mind
Stef
Le 17/8/15 11:28, Marcus Denker a écrit :
> Hi,
>
> I added two rules:
>
> RBRuleIfNotNilDo
> RBRuleIfNotEmptyDo
>
> They are finding the uses of
>
> ifNotEmptyDo:
> ifNotEmptyDo: notEmptyBlock ifEmpty: emptyBlock
> ifEmpty: emptyBlock ifNotEmptyDo: notEmptyBlock
> ifNotNilDo: aBlock
> ifNotNilDo: ifNotNilBlock ifNil: nilBlock
> ifNil: nilBlock ifNotNilDo: ifNotNilBlock
>
> In all these cases you can just use the normal version without do:
>
> In the past there was even yet another one: doIfNot… we thankfully deprecated
> and removed that in the past.
>
> We kept the Do: variants for compatibility, but the problem is that people nevertheless
> use them. All users now were added after we already rewrote once all users…
>
> With the code critique, I hope this will stop.
>
> (yes, not gravely important… but things like that have an impact if you do lots of them)
>
> Marcus
>