Newsgroups: comp.lang.misc,comp.object,comp.lang.scheme,comp.lang.functional,comp.lang.dylan
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!oitnews.harvard.edu!purdue!lerc.nasa.gov!magnus.acs.ohio-state.edu!math.ohio-state.edu!howland.reston.ans.net!ix.netcom.com!netcom.com!NewsWatcher!user
From: hbaker@netcom.com (Henry Baker)
Subject: Re: (debunk-myth '(debunk-myth '(<-efficient gc malloc/free)))
Message-ID: <hbaker-1311950023340001@10.0.2.15>
Sender: hbaker@netcom12.netcom.com
Organization: nil organization
References: <QOBI.95Oct22061418@qobi.ai> <46dm26$if4@jive.cs.utexas.edu> <QOBI.95Oct22124417@qobi.ai> <DH0GMA.A9w@Cadence.COM> <46n129$ssg@goanna.cs.rmit.EDU.AU> <rward-0411952019270001@ou048030.otago.ac.nz> <485tqb$ja@manuel.anu.edu.au>
Date: Mon, 13 Nov 1995 08:23:34 GMT
Lines: 29
Xref: glinda.oz.cs.cmu.edu comp.lang.misc:23754 comp.object:40582 comp.lang.scheme:14285 comp.lang.functional:6678 comp.lang.dylan:5894

In article <485tqb$ja@manuel.anu.edu.au>, Graham Matthews <graham> wrote:

> rward@random.otago.ac.nz (Roy Ward) wrote:
> >There is also a fledgeling language for the Mac (ReWrite) that _only_ has
> >unique types. 
> 
> Exactly what is a "unique type"?

Unique/linear/use-once types are all roughly the same idea -- objects whose
reference counts are constrained to be 0 or 1.  Of course, with only those
two states, you don't have to store the reference count at all.  If you have
a pointer to such an object, you have the _only_ pointer, so you can do
whatever you want to it without afffecting/hurting anyone else.

If linearity is enforced by the compiler (not terribly difficult), then
the compiler can warn you about linear variables that try to get used
more than once, or linear variables that don't get used at all (in which
case they get lost).  If this sounds something like the 'destructor' stuff in
C++, you're right.  You can get a crude approximation to linear variables
in C++ and/or you can use some of the same ideas in C++ to implement linear
variables correctly.

Look at:

ftp://ftp.netcom.com/pub/hb/hbaker/Use1Var.html  (or .ps.Z)

-- 
www/ftp directory:
ftp://ftp.netcom.com/pub/hb/hbaker/home.html
