On Tue, Mar 17, 2009 at 11:02 AM, Elena <egarr...@gmail.com> wrote:
>
> On Mar 17, 12:15 am, "Stephen C. Gilardi" <squee...@mac.com> wrote:
>> If *autodef-unresolved-symbols* is true, and if "a" has never been
>> mentioned before, this interaction with Clojure:
>>
>>         user=> a
>>         java.lang.Exception: Unable to resolve symbol: a in this context
>>
>> would become:
>>
>>         user=> a
>>         java.lang.IllegalStateException: Var user/a is unbound.
>
> Is an exception needed here? Don't exceptions mean computing has been
> aborted and shouldn't we use them to signal errors, not warnings?
> Would a simple message from Clojure (a special formatting to allow the
> IDE to highlight it) be better?

I understand why people want to be able to do things like this:

(defn b [] (a))
(defn a [] (...))

But that's completely different from the above.  The above is more like:

(a)
(defn a [] (...))

Why would you want that to warn and not be an error?  What would you
expect it to do if it was just a warning?

i.e. at the REPL, what would you expect that to print at each step.

user=> (a)
???
user=> (defn a [] (...))
#'user/a

-- 
Michael Wood <esiot...@gmail.com>

--~--~---------~--~----~------------~-------~--~----~
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
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