Message-ID: <32F23C66.A53@inxpress.net>
Date: Fri, 31 Jan 1997 12:39:34 -0600
From: drs <drs@inxpress.net>
Reply-To: drs@inxpress.net
Organization: University of Wisconsin
X-Mailer: Mozilla 3.01Gold (Win95; I)
MIME-Version: 1.0
Newsgroups: comp.object,comp.lang.smalltalk
Subject: Re: OO, C++, and something much better!
References: <JSA.97Jan16141937@alexandria> <5buodl$bci@boursy.news.erols.com>
											<32E2FEC7.2F7B@concentric.net> <5bvncj$gqg$1@A-abe.resnet.ucsb.edu>
											<32E47B4B.56D9@concentric.net> <6PI998tV3RB@herold.franken.de>
											<32E68D40.65EC@parcplace.com> <JSA.97Jan24191048@alexandria> <32E999AE.2F68@parcplace.com> <32ED02EE.22E2@netright.com> <32ED2448.685A@parcplace.com> <32EE20A3.755D@netright.com> <32EE3899.1B49@parcplace.com> <32EE86CC.6258@netright.com> <32EEE219.3C03@parcplace.com> <32EF9457.7E2C@netright.com> <32F135AE.5700@parcplace.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 204.120.4.216
Lines: 39
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!cam-news-feed3.bbnplanet.com!news.bbnplanet.com!cam-news-hub1.bbnplanet.com!howland.erols.net!news.sprintlink.net!news-peer.sprintlink.net!news.inxpress.net!204.120.4.216
Xref: glinda.oz.cs.cmu.edu comp.object:60658 comp.lang.smalltalk:50625

Eric Clayberg wrote:

[stuff I agree with omitted.]

> >         Null pointer usage.
> 
> Well, strictly speaking, Smalltalk doesn't use pointers so null pointers
> aren't an issue. The closest parallel would be the special Smalltalk
> object nil. 

Actually the opposite is a little closer to the truth: everything in
smalltalk 
is done via pointers. There is no pass by value, but only pass by
reference. So
in order to explain the nature of the smalltalk language to a C
programmer, it is probably sufficient to say that under smalltalk it
feels as if all variables
are passed transparently by reference. Instead of wasting time writing
copy
constructors, redefining assignment, or worrying about the explicit
allocation
and de-allocation of memory, one can get on with the business at hand.

However, it's worth noting that in lecture, one of my professors
expressed the opinion that explicit use of pointers is clearer and less
ambiguous than using a reference. This shows up sometimes in smalltalk
when
unexpected side-effects occur on the variables. Sometimes an explicit
*copy*
is required in order to simulate pass by value, because sometimes we
need
to preserve the original values instead of over-writing them. So, in
fact,
there are "pointer errors" under smalltalk. But it would be unusual if
they 
crashed a program. :)

Regards,
DRS
