Newsgroups: comp.lang.lisp,comp.lang.misc,comp.soft-sys.matlab
Path: cantaloupe.srv.cs.cmu.edu!bb3.andrew.cmu.edu!newsfeed.pitt.edu!godot.cc.duq.edu!newsgate.duke.edu!news.mathworks.com!newsfeed.internetmci.com!howland.reston.ans.net!ixnews1.ix.netcom.com!netcom.com!NewsWatcher!user
From: hbaker@netcom.com (Henry Baker)
Subject: Re: 'Open' languages: e.g., MATLAB
Message-ID: <hbaker-0507961743130001@10.0.2.15>
Sender: hbaker@netcom7.netcom.com
Organization: nil
References: <hbaker-2906960820130001@10.0.2.15> <xy74tnsrkhz.fsf@sans06.nada.kth.se> <31D7C7F1.CFB@tick.infomatik.uni-stuttgart.de> <wwaybl49hoq.fsf@bommel.math.ruu.nl> <31D86DA1.2D05@maths.anu.edu.au> <wwag27bgf0p.fsf@bommel.math.ruu.nl>
Date: Sat, 6 Jul 1996 01:43:13 GMT
Lines: 32
Xref: glinda.oz.cs.cmu.edu comp.lang.lisp:21979 comp.lang.misc:26156 comp.soft-sys.matlab:23050

In article <wwag27bgf0p.fsf@bommel.math.ruu.nl>, stephens@math.ruu.nl
(Bruce Stephens) wrote:

> That's interesting.  My comment is a general one: when you allow
> arrays, you either allow updates to the array (so I can say
> a[1,1]:=a[1,1]+1) which is unclean, or you require me to construct a
> new array (Sisal seems to have the syntax a[1,1] := old a[1,1]+1).
> 
> You can amortize that by giving me good features for constructing new
> arrays from old ones (as Sisal does), and of course the compiler
> should be able to recognise when copies don't need to be made, most of
> the time, but how can I be convinced the system is always going to be
> sufficiently efficient?

There are 'functional' languages -- e.g., 'Clean' -- in which certain
objects are typed as 'unique' (reference count = 1), and this property
is preserved by the primitives of the language.  Therefore, there is no
uncertainty in either the programmer's mind or the compiler's mind about
when it is legal/possible to 'update in place'.

This idea has been used by programming system _implementors_ since the
dawn of computers, but for some reason, it has only recently made it into
the quiver of the computer language designer.  (Probably because there is
now an official semantics for it -- 'linear logic'.)

Instead of making a language more complicated, it actually makes it simpler,
since you can have your 'update in place' semantics and your 'functional'
semantics at the same time!

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