[TUHS] Happy birthday, Niklaus Wirth!

tfb at tfeb.org tfb at tfeb.org
Sat Feb 17 06:13:24 AEST 2018


On 16 Feb 2018, at 13:34, Bakul Shah <bakul at bitblocks.com> wrote:
> 
> At any rate Algol's not having
> full lexical scoping does not mean one can simply reject the
> idea of being influenced by it. Often at the start there is
> lots of fumbling before people get it right. May be someone
> should ask Steele?

Yes, I certainly did not mean to imply that Scheme was not influenced by Algol: sorry if my message read that way.  What I was arguing against was that Scheme just somehow imported some concepts from Algol into Lisp: it *did* do that, but it also invented (or, at least, implemented in a practical, standardised language) a bunch of new concepts which were *not* present in Algol.

You are right of course that someone should ask Steele &co.

> And no, I do not think first class continuations automatically
> follow from lexical scoping.

I think they don't either, but I think that's because we've been talking about two things under one name: scope and extent.  What Scheme did was to say that it was going to be a language with lexical scope and indefinite extent, and it was going to take that seriously.  Most languages, even ones which purport to be lexically scoped, are usually both not entirely lexically scoped, and only take the indefinite extent thing seriously in sufficiently easy cases if they are.  An example of that is Common Lisp (I'm picking CL because CL is my favourite programming language which I've used for a very long time, so I think I'm allowed to be rude about it without causing offence).

CL has lexical scope and indefinite extent for variable and function bindings, so it has closures, for instance.  But it has dynamic scope and definite extent for condition handlers, for instance, as well as catch tags.  And finally it has lexical scope but definite extent for block names and go tags.

Scheme has lexical scope and indefinite extent for everything, and takes the attitude that if that makes it hard to implement then fine.  And I think that *that* was the new thing that Scheme did.  Whether the people designing Scheme knew that at the beginning (and whether their attitude was that rigorous from the beginning) I don't know.

(Of course, Scheme also made other Lisp people realise that lexical scope and mostly-indefinite-extent was a better approach than the older dynamic-scope-except-that-compiled-code-is-mostly-lexical horridness.  And I think all the Scheme implementations I've used have some mechanism of adding dynamic scope / definite extent for various things, because that's the obviously right scope for, say, condition handlers.)

I think this may be off-topic for this list, although I'm enjoying talking about it.

--tim

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://minnie.tuhs.org/pipermail/tuhs/attachments/20180216/81591cbc/attachment.html>


More information about the TUHS mailing list