Re: throw-if

2009-11-02 Thread Sean Devlin
+1 Name collision w/ core should be resolved when possible, especially if they do similar things. On Nov 1, 10:40 am, John Harrop wrote: > There seems to be a bit of wasteful duplication in clojure: there's a > private clojure.core/throw-if and there's clojure.contrib.except/th

throw-if

2009-11-01 Thread John Harrop
There seems to be a bit of wasteful duplication in clojure: there's a private clojure.core/throw-if and there's clojure.contrib.except/throw-if. Making matters sillier, they have somewhat different argument lists. Probably they should be merged into a public clojure.cor

Re: throw-if with no exception class

2008-12-12 Thread Randall R Schulz
On Friday 12 December 2008 01:18, Ralf Bensmann wrote: > Hi Rich, > > I am very interested in your view of the world - why are 'checked' > exceptions evil? It's a huge and unending debate (last I checked). It's probably not worth recapping it here. I'm sure there are reams of blogs and email li

Re: throw-if with no exception class

2008-12-12 Thread Ralf Bensmann
Hi Rich, I am very interested in your view of the world - why are 'checked' exceptions evil? Thanks -Ralf On Thu, Dec 11, 2008 at 2:08 PM, Rich Hickey wrote: > > > > On Dec 10, 10:52 pm, "Stephen C. Gilardi" wrote: > > On Dec 10, 2008, at 4:38 AM, Ralf Bensmann wrote: > > > > > Being a Java t

Re: throw-if with no exception class

2008-12-11 Thread Rich Hickey
On Dec 10, 10:52 pm, "Stephen C. Gilardi" <[EMAIL PROTECTED]> wrote: > On Dec 10, 2008, at 4:38 AM, Ralf Bensmann wrote: > > > Being a Java trainer for a long time, we talk with students about > > the "handle-or-declare rule" in Java and the two types of > > exceptions: "checked" (declared) and

Re: throw-if with no exception class

2008-12-11 Thread Ralf Bensmann
Just throwing "Exception" is discouraged in Java, because its the supertype checked and unchecked exceptions. I often saw a JVM die of an unproper exception handling -- mainly when NullPointerExceptions were involved. So we are on the JVM, want Java interop and so my isistent recommendation is to u

Re: throw-if with no exception class

2008-12-10 Thread Stephen C. Gilardi
On Dec 10, 2008, at 4:38 AM, Ralf Bensmann wrote: Being a Java trainer for a long time, we talk with students about the "handle-or-declare rule" in Java and the two types of exceptions: "checked" (declared) and "unchecked" (runtime). So I prefer using a RuntimeException because no exceptio

Re: throw-if with no exception class

2008-12-10 Thread Ralf Bensmann
Dec 10, 2008 at 3:46 AM, Mark Volkmann <[EMAIL PROTECTED]>wrote: > > The throw-if function from clojure.contrib.except will throw a > specified exception type. If none is specified, it throws a > java.lang.Exception. I was expecting it would through a > java.lang.RuntimeEx

throw-if with no exception class

2008-12-09 Thread Mark Volkmann
The throw-if function from clojure.contrib.except will throw a specified exception type. If none is specified, it throws a java.lang.Exception. I was expecting it would through a java.lang.RuntimeException. Which seems more correct? -- R. Mark Volkmann Object Computing, Inc