🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.misc
Article #1026

Re: PL/1 non-local goto versus setjmp/longjmp Re: CISC Microcode

#1026
From: Dipankar Gupta
Date: Thu, 20 Aug 1992 16:27
45 lines
2370 bytes
In article <id.KTGS.0N5@ferranti.com> peter@ferranti.com (Peter da Silva) writes:

[Elided]

| Basically, imagine integrating setjmp/longjmp with the language to a greater
| extent. ...

[More elided]

| But putting it directly in the language, you allow for more optimizations.
| By replacing goto, you clean up a messy part of the language without losing
| any general capability (switches with good optimization and this context
| can replace every use of goto).

[Stll more elided]

| Yes, you can build subroutine libraries that do this, but they're inherently
| non-portable. This sort of thing should be part of the language, and is much
| more important to me than expanding the type structure with object-oriented
| stuff.

What you describe was generalised by Peter Landin in '65, who called
it the J operator. It has been adopted, in particular, by languages
like Scheme and ML which use it to define powerful control structures.
(The FP/Lisp community calls it ``call with current continuation'' or
call/cc).  For examples of the usages that you outlined, see the
Scheme stream-based IO or the Cornell work on Concurrent ML.

Cheers,
Dipankar Gupta
Hewlett-Packard Laboratories
Bristol UK

PS: I don't think that ML has continuations as a part of the Standard,
but the New Jersey implementation provides call/cc as a first-class
language element.

References:
[1] Landin, P. A correspondence between Algol 60 and Church's lambda
notation: Part 1 [C. ACM 8(2) pp89-101, Feb. 1965]

[2] Clinger, W and Rees, J (eds). Revised^4 Report on the Algorithmic
Language Scheme.
--
--
Technical Details
Message-ID: <DG.92Aug20172716@polly.dgupta.hpl.hp.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!dtix!darwin.sura.net!mips!sdd.hp.com!hpscdc!hplextra!otter.hpl.hp.com!hpltoad!toad.hpl.hp.com!dg
References: <1992Aug12.073130.1@zodiac.rutgers.edu> <id.VJBS.0DK@ferranti.com> <mwm.1jk3@contessa.palo-alto.ca.us> <id.KTGS.0N5@ferranti.co

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!dtix!darwin.sura.net!mips!sdd.hp.com!hpscdc!hplextra!otter.hpl.hp.com!hpltoad!toad.hpl.hp.com!dg
From: dg@polly.dgupta.hpl.hp.com (Dipankar Gupta)
Newsgroups: comp.lang.misc
Subject: Re: PL/1 non-local goto versus setjmp/longjmp Re: CISC Microcode
Message-ID: <DG.92Aug20172716@polly.dgupta.hpl.hp.com>
Date: 20 Aug 92 16:27:16 GMT
References: <1992Aug12.073130.1@zodiac.rutgers.edu> <id.VJBS.0DK@ferranti.com> <mwm.1jk3@contessa.palo-alto.ca.us> <id.KTGS.0N5@ferranti.co
Sender: news@hplb.hpl.hp.com (Usenet News Administrator)
Organization: Hewlett-Packard Laboratories, Bristol, UK
Lines: 45
In-Reply-To: peter@ferranti.com's message of Tue, 18 Aug 1992 14:54:47 GMT
Nntp-Posting-Host: polly.hpl.hp.com