On Sep 27, 2012, at 8:23 PM, James Ashley <james.ash...@gmail.com> wrote:
> Typing this in at a REPL worked fine (well, a reasonable Null exception). > Running it from a script resulted in an unhandled NullArgumentException (or > something along those lines Based on this statement, I assume you're asking about behavior in script, not behavior in REPL, later. > Does this qualify as a bug? I doubt it, for the reasons below. > It's a stupid mistake on my part. I expect to be dumped to the REPL with an > error about the exception. > <snip> I don't think that I should *ever* be able to type in anything in > clojure that leads to an unhandled exception. I can see pros and cons both > ways, and I don't know what (if any) the community consensus might be. In the community of programming languages, the consensus is largely in favor of *not* dropping into REPL on error, except of course when already running in REPL. Clojure JVM, CPython et al, MRI Ruby et al, Perl, Common Lisps (where you can rebind the global handler if you like), most Schemes, GHCi et al, and even MS F# exhibit this console/REPL dichotomy. The reasoning, I imagine, is that an end user — the typical console user — is likely to be ill-served by a REPL exit. A counterexample demonstrates this: Squeak drops into a debugger on normal execution failure, as historical Smalltalk philosophy is that all computer users should learn programming. -- Stephen Compall Greetings from sunny Appleton! -- 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