Pharo vs GLASS: & operator

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Pharo vs GLASS: & operator

Thelliez
Just found this 'little' difference while working on TFLogin:

false & nil

In Pharo:  false
In Gemstone/S: error


Thierry
Reply | Threaded
Open this post in threaded view
|

Re: Pharo vs GLASS: & operator

Dale Henrichs
Yeah, I noticed this just the other day ... If I recall, GemStone conforms to (and enforces) the ANSI standard where the arg to & is supposed to be a boolean (and I think an error is supposed to be thrown), but Pharo/Squeak doesn't.

false>>& unconditionally answers false while true>>& unconditionally answers the arg ...

true & nil returns nil in Pharo and throws an error in GemStone ...

Dale

On Apr 15, 2011, at 7:19 PM, Thierry Thelliez wrote:

> Just found this 'little' difference while working on TFLogin:
>
> false & nil
>
> In Pharo:  false
> In Gemstone/S: error
>
>
> Thierry