Hi Alex,

Yes, you are right. I was mistaken. The "keyword" function does produce 
what I want. 

I didn't realized that in my code I was actually doing this: (keyword (str 
":something" "-empty"))

The colon in front of "something" was making me make a namespaced keyword.  
Removing the colon fixed my issue.

Thanks!


On Wednesday, March 21, 2018 at 6:32:53 AM UTC-7, Alex Miller wrote:
>
> I believe you are mistaken as the keyword function will create 
> :something-empty in this case. 
>
> ::something-empty is really a reader syntax for :user/something-empty btw 
> (where user is your current namespace), so it's not even possible to 
> "create" a keyword like ::something-empty.
>
> On Wednesday, March 21, 2018 at 8:15:43 AM UTC-5, Nick Mudge wrote:
>>
>> I want to programmatically create some keywords without namespaces?  Or 
>> are we not supposed to do that?
>>
>> I can't use the "keyword" function because that only creates keywords 
>> with a namespace.  
>>
>> For example doing this: 
>> (keyword (str "something" "-empty"))
>> Creates this: 
>> ::something-empty
>> But I want this:
>> :something-empty
>>
>>
>>

-- 
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
--- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to