Two new critique rules: RBRuleIfNotEmptyDo and RBRuleIfNotNilDo
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
Marcus Denker-4 wrote
We kept the Do: variants for compatibility, but the problem is that people nevertheless use them
This seems inevitable with things that are loaded by default. Can we extract the compatibility methods into a Grease-like library that can be loaded only when needed? ----- Cheers, Sean -- View this message in context: http://forum.world.st/Two-new-critique-rules-RBRuleIfNotEmptyDo-and-RBRuleIf... Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
On 17 Aug 2015, at 13:23, Sean P. DeNigris <sean@clipperadams.com> wrote:
Marcus Denker-4 wrote
We kept the Do: variants for compatibility, but the problem is that people nevertheless use them
This seems inevitable with things that are loaded by default. Can we extract the compatibility methods into a Grease-like library that can be loaded only when needed?
Yes, that would be nice. Marcus
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
participants (3)
-
Marcus Denker -
Sean P. DeNigris -
stepharo