Support of algebraic operations on sets

Ron Teitelbaum Ron at USMedRec.com
Fri Jun 15 15:14:23 UTC 2007


I should have kept reading first!  The reason I care about
symmetricDifference is that, way back when, I wrote a method to do this, and
spent more time trying to figure out what the name of the method should be
then it took to write the method!  I knew it had a name but I had no idea
what it was.

Ron

> -----Original Message-----
> From: squeak-dev-bounces at lists.squeakfoundation.org [mailto:squeak-dev-
> bounces at lists.squeakfoundation.org] On Behalf Of Gary Chambers
> Sent: Friday, June 15, 2007 9:49 AM
> To: 'The general-purpose Squeak developers list'
> Subject: RE: Support of algebraic operations on sets
> 
> How about...
> 
> | then now new |
> then := #(1 2 3).
> now := #(3 4 5).
> new := now symetricDifference: then.
> new "#(1 2 4 5)"
> 
> As in, "new" are the things that have changed.
> 
> -----Original Message-----
> From: squeak-dev-bounces at lists.squeakfoundation.org
> [mailto:squeak-dev-bounces at lists.squeakfoundation.org] On Behalf Of Bert
> Freudenberg
> Sent: 15 June 2007 2:38 pm
> To: The general-purpose Squeak developers list
> Subject: Re: Support of algebraic operations on sets
> 
> 
> I don't get you example - isn't that a difference?
> 
> | then now new |
> then := #(1 2 3).
> now := #(1 2 3 4 5).
> new := now difference: then.
> new "#(4 5)"
> 
> 
> - Bert -
> 
> On Jun 15, 2007, at 14:40 , Gary Chambers wrote:
> 
> > Yes, I've missed it! Think "things that are here now as opposed to
> > then".
> >
> > -----Original Message-----
> > From: squeak-dev-bounces at lists.squeakfoundation.org
> > [mailto:squeak-dev-bounces at lists.squeakfoundation.org] On Behalf Of
> > Bert
> > Freudenberg
> > Sent: 15 June 2007 1:21 pm
> > To: The general-purpose Squeak developers list
> > Subject: Re: Support of algebraic operations on sets
> >
> >
> > On Jun 15, 2007, at 13:52 , Gary Chambers wrote:
> >
> >> Note that #difference: is the relative complement of the two sets,
> >> rather
> >> than the symmetric difference.
> >> Perhaps we could have a method for that too!
> >
> > IMHO that's not nearly as universally useful as the other operations.
> > Has anybody ever missed it before? We're not talking about Set theory
> > but actual usefulness as a general Collection protocol.
> >
> > - Bert -
> >
> >
> >
> >
> 
> 
> 





More information about the Squeak-dev mailing list