Re: If Moto had Operator Overloading ...

"Charles Patterson" <cpatterson-N2D8602I6TJWk0Htik3J/[email protected]> Mon, 17 Mar 2003 10:55:14 -0500
Newsgroups gmane.comp.lang.moto.devel
Message-ID <004201c2ec9d$9c34ecd0$8b14a8c0@cpatterson>
> If Moto were to support Operator Overloading (which at this point would
> be fairly easy to implement) what operations (on what Objects) would we
> want to overload initially ?

> Stringset +(Stringset,Stringset) - Returns a new Stringset that is the
> union of the two Stringsets
> Intset +(Intset,Intset) - Returns a new Intset that is the union of the
> two Intsets
> Array +(Array,Array) - Returns a new Array that appends the contents of
> second vector to the first

Playing the devil's advocate again, these seem like the kinds of operators
that *shouldn't* be overridden.  It would only be confusing if adding two
Stringsets did something different.

Charlie