[gclist] Reference counting on the fingers of one thumb.
Henry G. Baker
Mon, 13 Jan 1997 09:26:14 -0800 (PST)
> My idea is that the programming language should enforce a "one object,
> one place" world view. (I'm in my office now, I can't be in the office
> and in the bathroom at the same time.) The reason for trying to do
> this, is the "one-object one place" paradigm is something our minds are
> trained on since toddlerhood. (The block is on the floor, it is no
> longer in my hand, WAAAH!) Thus I argue, if the computer world
> mimicked our spatial world more closely we would tend to create fewer bugs.
> I propose that assignment ALWAYS means deep copy.
> John Carter EMail: email@example.com
> Telephone : 27-12-808-0374x194 Fax:- 27-12-808-0338
There has been a lot of recent work on this idea in the context of
'linear logic', but the idea is (of course) much older than that.
Rather than attempt to give a comprehensive bibliography here, I will
simply point to a number of notes that I have written on the subject:
LFrpoly.html, LQsort.html, LRefCounts.html, LinearLisp.html
(all of these papers are also available as .ps.Z)
There is available online an excellent functional language for the
Macintosh with what they call 'unique' types (the same as 'linear'
types). This language is called Clean, and I think that it may
be downloadable for free. See ftp.cs.kun.nl/pub/Clean/
As I show in LBoyer and Frpoly, even applications where non-unique
types are 'obviously' better, linear types do surprisingly well, even
with their 'extra' deepcopying, and in the case of Frpoly, are actually
superior. It is still a bit of a mystery to me why this is the case,
but it may have to do more with the fact that modern architectures are
optimized for dys-functional languages, so these architectures make
brute-force copying more efficient that one would otherwise expect.