On Fri, Aug 28, 2009 at 10:57 AM, John Harrop<jharrop...@gmail.com> wrote:
> On Fri, Aug 28, 2009 at 8:50 AM, Rich Hickey <richhic...@gmail.com> wrote:
>>
>> On Thu, Aug 27, 2009 at 8:10 PM, Tim Snyder<tsnyder...@gmail.com> wrote:
>> >
>> > Well, I can see that LazySeq does indeed catch and wrap all Exceptions
>> > in a RuntimeException.  I also think I can work around it, but I'd
>> > like to know why this was done?
>> >
>> > Was it necessary given the checked vs. unchecked exception system of
>> > Java?
>> >
>>
>> Yes.
>
> What about declaring IFn.invoke() as "throws Exception"?

It is declared that way.

> Or did you think
> that would make calling Clojure from Java too painful?

Everything about checked exceptions is painful. Wrapped exceptions are
a fact of checked exceptions, since callers and base
classes/interfaces get to decide what problems (as yet unwritten)
callees/derivees can have (including none), e.g. Object.toString()
dictates no object can have a problem producing a string, but a lazy
sequence, whose contents are determined by calls to who-knows-what
functions, might have a problem in toString(). It's a bad system, I
didn't invent it, sorry.

> Or was there some
> other reason?

There are many other call paths that don't have Exception declared.

Rich

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to