Two questions

Alejandro F. Reimondo alereimondo at
Fri Jun 27 16:54:59 UTC 1997


Why not to use #& and #| for and & or operations?

Your source code:
  ^self class new: value + (self negated and: aProbablity negated) value

Can be compiled successfully in other Smalltalk environments
 (like Smalltalk Express and Visual Smalltalk).

I think that Squeak parser must not try to optimize #and:
 if the argument is not a block node.


Desde: 	sqrmax at[SMTP:sqrmax at]
Enviado el: 	Sábado 27 de Junio de 1998 16:51
Para: 	squeak at
Asunto: 	Re: Re: Two questions


>>^self class new: value + (self negated and: aProbability negated) value
>I assume that the class this method is in implements an "and:" message, 
>which is what you are trying to use in the code above.


>If this is the case, then you will have to choose a different names for 
>your operations than "and:" and "or:".

Oh, boy... probabilities look so ugly without them...  anyway, I chose 
andWith:, orWith: and so. Do you know of any nicer selectors?


More information about the Squeak-dev mailing list