[BUG] two different ways to handle assert:

Daniel V. Oppenheim music at watson.ibm.com
Tue Jun 12 16:57:05 UTC 2001


Thanks Pablo!

I clean forgot that <aBoolean value> returns self. So both implementations 
work the same both for booleans and block arguemnts, so long the blocks 
return a boolean when evaluated.

         Danny


At 01:22 PM 6/12/01 -0700, you wrote:
>I think that we must have only one way of handle #assert:.
>If you implement #assert: assuming that the argument is a block that
>evaluates to a boolean, or an object that understand value and answer a
>boolean (this is the reason to implement Boolean>value), then you don't have
>to rewrite the senders of #assert:, only the implementors.
>
>cheers, Pablo
>
>
>
>----- Original Message -----
>From: "Daniel V. Oppenheim" <music at watson.ibm.com>
>To: <squeak at cs.uiuc.edu>
>Sent: Tuesday, June 12, 2001 8:24 AM
>Subject: Re: [BUG] two different ways to handle assert:
>
>
> > Pablo
> >
> > The problem is that the system has two different implementations -- one
> > expects a block as argument, the other a boolean. This is not good.
> >
> >          Danny
> >
> > At 11:09 AM 6/12/01 -0700, you wrote:
> > >You can expect allways a block, and implement
> > >
> > >Boolean>>value
> > >        ^self
> > >
> > >
> > >By the way, this is my first message to the list and I must say thanks
>for
> > >Squeak to the people that made it and to all the people that works to
>make
> > >it better
> > >
> > >Pablo
> > >
> > >
> > >----- Original Message -----
> > >From: "Daniel V. Oppenheim" <music at watson.ibm.com>
> > >To: "Squeak Mailing List" <squeak at cs.uiuc.edu>
> > >Sent: Monday, June 11, 2001 1:26 PM
> > >Subject: [BUG] two different ways to handle assert:
> > >
> > >
> > > > The system handles <assert:> in two different ways: Object expects a
>Block
> > > > as argument, whereas all other 3 classes expect a Boolean. This is not
>a
> > > > good idea... However, there are only 39 senders so its an easy fix;
> > > > slightly complicated with the implementation of <assert> in
>BlockContext,
> > > > but that only has 7 senders.
> > > >
> > > > I think aBoolean makes more sense than aBlock as argument.
> > > >
> > > > Since I need to fix this anyhow in order to file in my own code I will
>be
> > > > happy to make the change, update all system methods, and send the fix
> > >in --
> > > > but being new to the squeak-fix process please let me know what is the
> > > > preferred way of handling this.
> > > >
> > > > Thanks
> > > >
> > > > Danny Oppenheim
> > > > ---
> > > >
> > > > Dr. Daniel V.
> > > > Oppenheim
> > > >
> > > > Computer Music Center
> > > > IBM T.J. Watson Research Center      phone: (914) 945-1989
> > > > P. O. Box 218 (or Route 134)      fax:   (914) 945-3434
> > > > Yorktown Heights, NY 10598      www.research.ibm.com/music
> > > >
> > > >
> >
> > ---
> >
> > Dr. Daniel V.
> > Oppenheim
> >
> > Computer Music Center
> > IBM T.J. Watson Research Center      phone: (914) 945-1989
> > P. O. Box 218 (or Route 134)      fax:   (914) 945-3434
> > Yorktown Heights, NY 10598      www.research.ibm.com/music
> >
> >

---

Dr. Daniel V. 
Oppenheim 

	Computer Music Center
	IBM T.J. Watson Research Center	     phone: (914) 945-1989
	P. O. Box 218 (or Route 134)	     fax:   (914) 945-3434
	Yorktown Heights, NY 10598	     www.research.ibm.com/music






More information about the Squeak-dev mailing list