On Mon, 13 Nov 1995 22:29:10 GMT, Stavros Macrakis <macrakis@osf.org> wrote:>davids@ICSI.Berkeley.EDU (David Petrie Stoutamire) writes:>> ...[in Sather,] there deliberately isn't any way to redefine> assignment `:='...>>There is a good argument to be made that assignment should be>overloadable. Here are a few of the standard examples where it's a>good idea:

Of course, in Sather, for objects of reference classes, := only copies
references to objects (pointers, for you C types), meaning it's not
actually changing objects. Objects of value classes are considered
immutable and should be small, so it makes sense for := to be a
bitwise copy; conceptually there's one copy of every possible value of
an immutable type, i.e. such as integers. If you want to actually do
object duplication you typically use a .copy method (a := b.copy),
which can of course be overriden.