Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3239558
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T17:59:03+00:00 2026-05-17T17:59:03+00:00

I am looking for a list of the allowed characters in a clojure keyword.

  • 0

I am looking for a list of the allowed characters in a clojure keyword. Specifically I am interested to know if any of the following characters are allowed: - _ /.

I am not a java programmer, so I would not know the underlying ramifications if any. I don’t know if the clojure keyword is mapped to a java keyword if there is such a thing.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T17:59:04+00:00Added an answer on May 17, 2026 at 5:59 pm

    Edit:

    When I initially composed this answer, I was probably a little too heavily invested in the question of “what can you get away with?” In fairness to myself though, the keyword admissibility issue appears to be unsettled still. So:

    First, a little about keywords, for new readers:

    • Keywords come in two flavours, qualified and unqualified. Unqualified keywords, like :foo, have no namespace component. Qualified keywords look like :foo/bar where the part prior to the slash is the namespace, ostensibly. Keywords can’t be referred, and can be given a non-existent namespace, so their namespace behaviour is different from other Clojure objects.
    • Keywords can be created either by literals to the reader, like :foo, or by the keyword function, which is (keyword name-str) or (keyword ns name).
    • Keywords evaluate to themselves only, unlike symbols which point to vars. Note that keywords are not symbols.

    What is officially permitted?

    According to the reader documentation a single slash is permitted, a no periods in the name, and all rules to do with symbols.

    What is actually permitted?

    More or less anything but spaces seem to be permitted in the reader. For instance,

    user> :-_./asdfgse/aser/se
    :-_./asdfgse/aser/se
    

    Appears to be legal. The namespace for the above keyword is:

    user> (namespace :-_./asdfgse/aser/se)
    "-_./asdfgse/aser"
    

    So the namespace appears to consist of everything prior to the last forward slash.

    The keyword function is even more permissive:

    user> (keyword "////+" "/////")
    :////+//////
    user> (namespace (keyword "////+" "/////"))
    "////+"
    

    And similarly, spaces are fine too if you use the keyword function. I’m not sure exactly what limitations are placed on Unicode characters, but the REPL doesn’t appear to complain when I put in arbitrary characters.

    What’s likely to happen in the future:

    There have been some rumblings about validating keywords as they are interned. Supposedly one of the longest open clojure tickets is concerned with validation of keywords. So the keyword function may cease to be so permissive in the future, though that seems to be up in the air. See the assembla ticket and google group discussion.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know the differences between Set and List(unique vs. duplications allowed, not ordered/ordered, etc).
I know the differences between Set and List(unique vs. duplications allowed, not ordered/ordered, etc).
Keep in mind that I'm not looking for a list of current browsers to
Looking to get a list of all the files (commit comments would be nice
Looking for a list of Windows versions (service packs included) and what version of
I am looking for a list of all file types that can be associated
I am looking for a list of countries for use in the development of
Super-newbie question! I've been looking for a list of all the classes that come
Im looking to group and sort a Generic List<>. I have a list of
I'm looking for a dead simple mailing list (unix friendly). Robustness, fine-grained configurability, enterprise-readiness

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.