🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.prolog
Article #2339

Re: block and exit_block

#2339
From: Bart Demoen
Date: Wed, 19 Jun 1991 07:43
26 lines
1621 bytes
In <6378@goanna.cs.rmit.oz.au> ok@goanna.cs.rmit.oz.au (Richard A. O'Keefe)
wrote:

> No, I'm afraid that doesn't do the job.  It can only restore the
> bindings of variables that (occur in the bindings of variables
> that) are visible at the point of the throw.  If I do
> 
> 	var(X), catch(Ball, (X = 1, p(Ball)), true)
> 
> there is no definition I can give to p/1 which will result in the
> value of X being preserved.

that's correct and I didn't imply that you wouldn't have to rewrite - in
particular: add arguments to - some of the predicates in your program;
in the example above, X should be visible at the point of the throw, so
you have to make it a parameter of p - that's why I said that ot doesn't
look nice

I appreciate Richard's comments about the distiction between non-local
control transfer and exception handling, but it seems to me that Prolog
can do both with just one mechanism - or one pair of builtin predicates;

and for me, there remains the question: should WG17 try to standardize
non-local control transfer and exception handling ?

Bart Demoen
Technical Details
Message-ID: <4016@n-kulcs.cs.kuleuven.ac.be>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!spool.mu.edu!olivea!uunet!mcsun!ub4b!kulcs!hera.cs.kuleuven.ac.be

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!spool.mu.edu!olivea!uunet!mcsun!ub4b!kulcs!hera.cs.kuleuven.ac.be
From: bimbart@hera.cs.kuleuven.ac.be (Bart Demoen)
Newsgroups: comp.lang.prolog
Subject: Re: block and exit_block
Message-ID: <4016@n-kulcs.cs.kuleuven.ac.be>
Date: 19 Jun 91 07:43:33 GMT
Sender: news@cs.kuleuven.ac.be
Organization: Dept. of Computer Science (K.U.Leuven)
Lines: 26
Originator: bimbart@hera.cs.kuleuven.ac.be