🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.misc
Article #3526

Re: Dynamic typing (part 3)

#3526
From: Dr A. N. Walker
Date: Mon, 15 Apr 1991 18:38
90 lines
4974 bytes
In article <1366@optima.cs.arizona.edu> gudeman@cs.arizona.edu (David Gudeman)
replied rather peevishly to my <1991Mar29.191210.9369@maths.nott.ac.uk>:

	[On April 1st!  Thanks to some time warp, DG's article has only just
reached sunny Nottingham.]

	Well, you don't want to read it again.  I'm happy to let readers
decide which of us is the more confused about Algol and its implementation.

One or two more substantive points:

>]Algol 60:  Intended primarily as a descriptive language, and certainly
>]	not efficient (call by name, dynamic typing
>                                     -------
>I assume you meant "static".

	You omitted to quote the "smiley" & the examples I gave.  "2^j"
is an integer if "j" is +ve, a real if it's -ve, so the type must be
handled dynamically.  In "f(2)", the compiler cannot tell, in general,
whether "2" is a number or a label, so must provide enough information
for the called routine to handle both [in real life, most (?all) actual
implementations banned numeric labels].  More generally, a procedure which
is passed as a parameter cannot have its parameters specified, so that
uses of such parameters have dynamic type.

>]	 recursive procedures, or dynamic arrays,
>
>Both features can be compiled.

	That is obvious with hindsight.  I have a vague memory that
recursive procedures only got into Algol 60 by oversight;  on the last
day, someone realised that they hadn't been *excluded*, and there was a
furious debate with arguments about whether it was possible or useful,
on the successful conclusion of which they were left in.  Anyone know
better, or have I just started an urban legend?  In any case, dynamic
*own* arrays are a pig to compile;  again, they were [?universally]
omitted from implementations.

>I should have been more specific: concatenatable, sectionable strings
>with automatic storage management.  Those pathetic things that
>statically typed languages call "strings" are really character arrays.

	Algol 68 is statically typed;  its strings have all those properties.

>Mathematicians had thought [graphs, eg] were useful for decades or centuries,

	Perhaps so, and there may have been lots going on at the research
level, but graphs were not part of the normal armoury of the typical maths
graduate or postgraduate in 1960.  Even today, I would guess that most
mathematicians who avoid the specialist pure or computing courses will learn
rather little about graphs.  I checked some of my textbooks [mostly 60's
vintage].  I couldn't find a mention of graphs in *any* of the maths texts.
I recall that in about 1974, a [reasonably distinguished] colleague was
berated in public by his [rather more distinguished] head of department
for wasting his time researching in graph theory -- "Time you did some
*real* maths".  I think that expecting graphs to appear in a computing
language mainly intended for expressing numerical algorithms in 1960 is
simply anachronistic.

	DG's assertion started out in an admirably succinct form, with
two parts:  (i) Algol is a low-level language, (ii) into which static
typing was introduced as an efficiency hack.  I can make sense of this,
but strongly disagree with it.

	He now says that by Algol he really means "the design philosophy
that resulted in Algol 60", and [as far as I can make out] that by
efficiency he really means the frame of mind of "Type A designers"
(concerned with efficiency, as opposed to type B expressivists);  he
adds

>				    Thus [type A languages] needed
>static typing, [...]
>Algol 60 clearly and unambiguously fits into type A.  It is true that
>_within the type A camp_, they were somewhat cavalier about
>efficiency, [...]

	But Algol 60 was designed expressly to be machine *in*dependent,
in so far as its designers were able.  People were fed up with having to
invent a new high-level language for every new computer.  The results may
not have been as untainted with hardware considerations as DG would like,
but the *intent* and the *philosophy* was high-level.  And assertion (ii)
now seems to read that static typing was introduced as an efficiency hack
into a language that needed static typing by people who were cavalier, as
far as languages that need static typing go, about efficiency.  I can
discern a dim glimmer of meaning behind this;  but I just don't agree
with it.  Perhaps that's a good place to stop.

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

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!crdgw1!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: <1991Apr15.183805.10544@maths.nott.ac.uk>
Date: 15 Apr 91 18:38:05 GMT
References: <1366@optima.cs.arizona.edu>
Reply-To: anw@maths.nott.ac.uk (Dr A. N. Walker)
Organization: Maths Dept., Nott'm Univ., UK.
Lines: 90