Re: try/catch macros for Postgres backend

From: Christopher Browne <cbbrowne(at)acm(dot)org>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: try/catch macros for Postgres backend
Date: 2004-07-29 05:03:29
Message-ID: m3smbbs8v2.fsf@wolfe.cbbrowne.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

tgl(at)sss(dot)pgh(dot)pa(dot)us (Tom Lane) wrote:
> Does anyone have a problem with this macro syntax? The try/catch
> names are stolen from Java, so I'm figuring they won't terribly
> surprise any modern programmer, but I'm open to different names if
> anyone has a better idea.

Mitch Bradley, once of Sun, once founder of "Bradley ForthWorks," and
creator of the form of Forth used for the OpenBOOT standard, got it
introduced to ANSI Forth. I remember this being a pretty neat
addition to Forth back in the late '80s...

<http://dec.bournemouth.ac.uk/forth/euro/ef98/milendorf98.pdf>

That paper attributes it as having come from Lisp.

Java almost certainly "stole" it from Common Lisp, which took it from
MacLisp (albeit with changes in semantics).

Guy Steele, now a Sun Fellow, documents this in _Common Lisp, The
Language_ (2nd edition), section 7.11.

Python has it; Perl has an add-in; Ruby has it; Scheme has it
(possibly as an SRFI rather than in R?RS); Modula-3 has it (sans the
"catch" keyword), and the canonical reference, there, is by Harbison,
known to work with the very same Steele :-). Haskell hasn't a
"throw," but does have a "catch." OCAML has "raise" and "try," where
"catch" is implicit in the trying. ISO Prolog has catch/3 and
throw/1. Ada has "raise" and exception handlers...

I would therefore think that anything _other_ than this naming
convention would appear remarkable and surprising :-).
--
(reverse (concatenate 'string "gro.mca" "@" "enworbbc"))
http://www3.sympatico.ca/cbbrowne/languages.html
If you're sending someone some Styrofoam, what do you pack it in?

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Fabien COELHO 2004-07-29 05:04:39 Re: try/catch macros for Postgres backend
Previous Message Coloring Graph 2004-07-29 04:38:35 7.5 devel initdb failure