Jonathan S. Shapiro wrote:
> On a separate note, I have just realized that the THROW keyword is
> completely redundant outside of a catch block. The mere construction of
> an exception is sufficient to indicate a need to throw. I'm not
> convinced that THROW should go away, but it's always interesting to
> notice these things.

I think that the throw keyword is not completely redundant. The
separation of exception construction and raise can be potentially
useful. For example, the function fact below accepts a custom exception
argument which is thrown in the event of any error:

(define (fact n Xn:exception)
     (if (n < 0) (throw Xn) <otherwise compute factorial>)

(fact 10 array-out-of-bounds)
(fact -1 (my-exception -1))

Swaroop.
_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev

Reply via email to