> From: Jerome Peace <
[hidden email]>
> Subject: Re: [squeak-dev] How to tell if you have a boolean when you care to know
> To: "Michael van der Gulik" <
[hidden email]>
> Date: Wednesday, March 25, 2009, 5:42 PM
> --- On Wed, 3/25/09, Michael van der Gulik
> <
[hidden email]> wrote:
>
> > From: Michael van der Gulik <
[hidden email]>
> > Subject: Re: [squeak-dev] How to tell if you have a
> boolean when you care to know
> > To:
[hidden email], "The
> general-purpose Squeak developers list"
> <
[hidden email]>
> > Date: Wednesday, March 25, 2009, 5:01 PM
> > On 3/25/09, Jerome Peace
> <
[hidden email]>
> > wrote:
> > >
> > >
> > > In another tread Keith Hodges wrote:
> > >
> > > 2009/3/24 Keith Hodges <keith_hodges at
> > yahoo.co.uk>
> > >
> > >> true xor: [ true ] => true
> > >>
> > >> discuss
> > >>
> > >> Keith
> > >
> > > a simple guard for a boolean can be written
> simply.
> > >
> > > true xor: bar aBoolean
> >
> > Don't you mean >>asBoolean?
>
> Absolutely NOT. Reread the original post.
>
> asBoolean returns true or false for all objects.
> The expectations is that objects other than Booleans will
> return true or false.
>
> The purpose of aBoolean is to throw an error when foo is
> not a boolean.
>
> The elaborate form of the message would be
>
> surelyYourABoolean
>
> "To which non Booleans would reply"
>
> ^self error: 'No I'm not a boolean and stop calling
> me Shirley.'
>
> Which I got from remembering Leslie Nielson in the movie
> Airplane. :)
>
> Thanks for giving me a chance to clear that up.
>
> Yours in curiosity and service, --Jerome Peace