The main use for qualified keywords that occurs to me is if you have a
"promiscuous map" that will be holding key/value pairs submitted by
multiple pieces of code of distinct origins. A big registry of preferences
that can be added to by plugins would be an example, with qualified
keywords making it much less likely for two plugins to be made that are
incompatible with each other because they keep overwriting each others'
preferences.


On Wed, Apr 10, 2013 at 9:13 AM, Jim foo.bar <[email protected]> wrote:

> On 10/04/13 14:03, Simon Katz wrote:
>
>> Second, Clojure supports namespace-qualified keywords, presumably because
>> it's possible that different libraries might want to use the same keyword
>> for different purposes.
>>
>
> I don't think that is the reason for having namespace-qualified
> keywords...different libraries might want to use the same keyword for
> different purposes and that is fine - no clashes (or at elast I've not
> understood what you mean).
>
> It's my understanding that ::foo has (or should have) actual 'meaning' in
> whatever namespace it exists whereas :foo doesn’t really have any 'meaning'.
>
> I don't really think you want to access your record fields with a
> namespace-qualified keyword, do you? How would that work exactly? what if
> you got an instance of the record outside the namespace where the
> namespace-qualified keyword is defined? It doesn't make sense to me at
> all...
>
> Jim
>
>
> --
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to [email protected]
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscribe@**googlegroups.com<clojure%[email protected]>
> For more options, visit this group at
> http://groups.google.com/**group/clojure?hl=en<http://groups.google.com/group/clojure?hl=en>
> --- You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to 
> clojure+unsubscribe@**googlegroups.com<clojure%[email protected]>
> .
> For more options, visit 
> https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>
> .
>
>
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to