home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!stanford.edu!agate!anarres.CS.Berkeley.EDU!bh
- From: bh@anarres.CS.Berkeley.EDU (Brian Harvey)
- Newsgroups: comp.lang.scheme
- Subject: Re: Location tags of primitive procedures
- Date: 13 Nov 1992 15:25:47 GMT
- Organization: University of California, Berkeley
- Lines: 20
- Distribution: world
- Message-ID: <1e0hdrINN5pr@agate.berkeley.edu>
- References: <PK.92Nov13122624@talitiainen.cs.tut.fi>
- NNTP-Posting-Host: anarres.cs.berkeley.edu
-
- pk@cs.tut.fi (Kellom{ki Pertti) writes:
- | [...] I try to catch application of a primitive procedure that
- |would cause a runtime error. This is done by having an alist of
- |procedures and associated information about the parameters they
- |accept, for example
- |
- | ...
- | (,close-input-port (1 ,(assert 1 input-port?)))
- | (,close-output-port (1 ,(assert 1 output-port?)))
- |
- |Before a procedure is actually applied, it is first looked up in the
- |alist.
-
- Haven't we all had to do things like this? Doesn't it seem silly
- to spend our time rewriting the Scheme interpreter? That's what this
- amounts to. I think we should find a way to solve this particular
- problem by having a portable catch-error mechanism.
-
- (P.S. Your article arrived with "Distribution: comp" in the header
- and that made my attempted reply bounce the first time.)
-