Copy constructors

Marcin 'Qrczak' Kowalczyk qrczak at knm.org.pl
Tue Aug 14 18:21:15 EDT 2001


Tue, 14 Aug 2001 22:14:26 +0200, Alex Martelli <aleaxit at yahoo.com> pisze:

> What makes you think it HAS to be "pick one" when many languages
> have neither (C++, say) and several have both (Ruby, Smalltalk
> [with 'becomes'], Dylan...)?

IIRC Smalltalk's 'becomes' is a horrible hack which used to be easy
to implement where it appeared for the first time because of an extra
indirection in all objects, but requires scanning the whole world
changing all references to the given object in modern implementations.
And it causes a disaster when an important object like nil is replaced.

So maybe it is possible, but it's certainly a bad fit to the
Smalltalk's object model, discouraged and maybe deprecated.

Disclaimer: I never used Smalltalk and may remember wrong.

-- 
 __("<  Marcin Kowalczyk * qrczak at knm.org.pl http://qrczak.ids.net.pl/
 \__/
  ^^                      SYGNATURA ZASTĘPCZA
QRCZAK



More information about the Python-list mailing list