Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!bu.edu!wang!harvee!esj From: esj@harvee.UUCP (Eric S Johansson) Newsgroups: comp.lang.forth Subject: Re: ANS TC Magnet for Cont. Ref. Set Message-ID: <2756383@harvee.UUCP> Date: 28 Jan 91 23:44:30 GMT References: <2284.UUL1.3#5129@willett.pgh.pa.us> Organization: gators 'r us Lines: 42 X-Version: Rodney's UUCP modules 05/09/90 V1.15 In article <2284.UUL1.3#5129@willett.pgh.pa.us> ForthNet@willett.pgh.pa.us (ForthNet articles from GEnie) writes: > > Doug Philips comments: > > > What you really want here is some kind of UNWIND-PROTECTION so that > > if the current word is going to be blasted off the return stack > > by a catch, you want some code to execute first. > > Indeed, I ran into this problem once, and the exception handler I designed > (see SIGForth vol.1 no.2) had precisely this capability. > (It also allowed execution to continue after corrective action was taken, but > this capability may not be as generally useful.) > > Concerns like this are why I believe it's too soon to standardize > a Forth exception handler. > > - Brad > ----- I beg to differ. I believe the knowledge needed for a "good" exception handler is available from outside the forth community. I suggest folks check out exception handlers in eiffle, c++ smalltalk and lisp as role models for a forth exception handlers. I generally find the current definition of catch/throw almost primitive enough to permit construction of more "complete" exception handlers. The one thing I find missing and can't figure out how to synthesize is something like the eiffle retry semantics. the fact that we can think of problems with a part of the standard is no reason to chuck that part. --- eric -- ... ^^^ eric johansson UUCP ...!uunet!wang!harvee!esj esj@harvee.uucp * * a juggling fool AT&T (617) 577-4068 (w) o HAM ka1eec \_/ CSNET johansson%hydra@polaroid.com or hydra!johansson@polaroid.com source of the public's fear of the unknown since 1956