🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.misc
Article #3677

Re: Dynamic typing (part 3)

#3677
From: Dr A. N. Walker
Date: Fri, 26 Apr 1991 16:47
46 lines
2630 bytes
In article <5388@goanna.cs.rmit.oz.au> ok@goanna.cs.rmit.oz.au
(Richard A. O'Keefe) writes:

>If I remember correctly, Burroughs Algol supported [dynamic own arrays].
>There never was any particular problem in compiling them;
>the problem was in chosing from several interpretations of what
>they should mean (not unlike C++, just like a head cold is not
>altogether unlike the Plague).  The interpretation which was
>adopted for Algol 60.1 is that the bounds are determined the
>first time that the declaration is elaborated, and don't change
>after that.

	Well, yes, there's no difficulty compiling that interpretation.
But it could be [and was] argued that the bounds should be re-determined
every time, and that any common elements should be preserved.  Eg,
imagine an implementation of Conway's Life, in which, for efficiency,
only the active part of the board is retained.  We might have

	own Boolean array board [lorow:hirow, locol:hicol];

where "lorow" (etc) are integer procedures returning the first row (etc)
that needs to be considered.  As the "game" evolves, this declaration is
re-elaborated every generation, and the active region might march all
over the place and then back again.  Perfectly reasonable from the user's
point of view, not so nice for the compiler.  Possible, but not nice.

>This is a pig to compile?

	Quote from "Algol 60 Implementation", Randell & Russell, Academic
Press, 1964 [a detailed description of the Walgol interpreter, which has
very few restrictions], p271:

	"(vi) Dynamic Own Arrays are not Allowed
	 [...]
	 The difficulty of implementing dynamic own arrays is that the
	 size and shape of an own array, whose elements must be retained
	 when the block in which it is declared is left, may change on
	 subsequent entries to the block.  A proposed technique for
	 implementing dynamic own arrays is described in a paper by
	 Ingerman" [CACM 4, 1, pp 59-65, 1961].

So R&R clearly interpreted dynamic own arrays to include the case above.

-- 
Andy Walker, Maths Dept., Nott'm Univ., UK.
anw@maths.nott.ac.uk
Technical Details
Message-ID: <1991Apr26.164725.2347@maths.nott.ac.uk>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!ukc!warwick!nott-cs!piaggio!anw
References: <1366@optima.cs.arizona.edu> <1991Apr15.183805.10544@maths.nott.ac.uk> <5388@goanna.cs.rmit.oz.au>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!ukc!warwick!nott-cs!piaggio!anw
From: anw@maths.nott.ac.uk (Dr A. N. Walker)
Newsgroups: comp.lang.misc
Subject: Re: Dynamic typing (part 3)
Message-ID: <1991Apr26.164725.2347@maths.nott.ac.uk>
Date: 26 Apr 91 16:47:25 GMT
References: <1366@optima.cs.arizona.edu> <1991Apr15.183805.10544@maths.nott.ac.uk> <5388@goanna.cs.rmit.oz.au>
Reply-To: anw@maths.nott.ac.uk (Dr A. N. Walker)
Organization: Maths Dept., Nott'm Univ., UK.
Lines: 46