[squeak-dev] and:and:and:...

Levente Uzonyi leves at elte.hu
Sat Jan 2 02:59:40 UTC 2010


On Fri, 1 Jan 2010, Nicolas Cellier wrote:

> Happy new year squeakers!
>
> A question of style to start: I know, nested conditions
>    c1 and: [c2 and: [c3]]
> are sometimes harder to read than separated
>    c1 and: [c2] and: [c3]
> I personally don't feel the former as a problem, especially with good
> indentations and shout.
> The main difference is that the later won't be inlined and will thus
> be slower - unless Cog change the deal?
>
> There is another difference in favor of the later: it produces shorter
> jump and thus can compile longer methods. But that is a bad
> argument... Methods should better be short.
>
> IMO these squeakisms have too low a value and should be deprecated. Thoughts?
>

I agree. I also prefer #and: and #or: against #& and #|, mainly because 
of better performance. These two are in the ANSI standard so we shouldn't 
remove them, but replacing their sends with #and: and #or: in the trunk 
sounds like a good idea.


Levente

> Nicolas
>
>



More information about the Squeak-dev mailing list