Lukas what would be good is to have a specific pharo smallLint that we could run to check. My brain is too small for all these details. Stef On May 24, 2010, at 6:18 PM, Lukas Renggli wrote:
For now the list of levente and a slow machine
"So "== nil" #ifNil:, #ifNil:ifNotNil:, #ifNotNil:, #ifNotNil:ifNil: should be used whenever possible." is the one to use
Please read my comments on the issue tracker.
For *any practical* example it doesn't matter what to use speed wise:
1 = nil ifTrue: [ ] 2 == nil ifTrue: [ ] 3 isNil ifTrue: [ ] 4 ifNil: [ ]
Personally I find 3 the most readable. 1 and 3 are the only practical ones if you use OODBs, because they are not shortcut by the compiler.
I only use 4 for lazy initializers, it makes a good pattern. The use of #ifNil:ifNotNil:, #ifNotNil:, #ifNotNil:ifNil: is only practicable if you don't care about compatibility with other Smalltalk dialects.
Lukas
-- Lukas Renggli www.lukas-renggli.ch
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project