On Mon, Dec 22, 2008 at 9:10 AM, Rich Hickey <richhic...@gmail.com> wrote:
>
> On Dec 22, 8:55 am, "Mark Volkmann" <r.mark.volkm...@gmail.com> wrote:
>>
>> I thought that every symbol and keyword was in some namespace,
>> defaulting to the current namespace when the symbol or keyword is
>> defined.
>
> Symbols and keywords aren't 'in' namespaces. They are just names and
> that might have namespace components.

I don't understand the distinction. Wouldn't one say that everything
with a given "namespace component" is "in" that namespace?

>> Since the default namespace in the REPL is user, that's what
>> I expected. I get the same error though with any symbol that I def.
>> For example,
>>
>> (def n 1)
>> (namespace n)
>
> You don't def symbols, you def vars. (def n 1) creates a var named by
> the symbol n, with a value of 1.
>
> When you say n in an expression context you are asking for the value
> of the var named by n, i.e. 1.
>
> Vars and Symbols are different things. If you have some experience
> with CL - this is an area where Clojure differs a lot.

Thanks for explaining that!
As it turns out, I don't have much experience in any Lisp variant.

-- 
R. Mark Volkmann
Object Computing, Inc.

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