Uploaded image for project: 'Clojure'
  1. CLJ-463

Strip leading colons when creating keywords from single strings

    Details

    • Type: Improvement
    • Status: Closed
    • Resolution: Declined
    • Affects versions: None
    • Fix versions: Backlog
    • Labels:
      None

      Description

      This seems unfortunate:

      => (-> :foo str keyword)
      ::foo

      Symbols are far saner in this regard:

      => (-> 'foo str symbol)
      foo

      Simply stripping leading colons from strings prior to turning them into keywords should suffice. The 2-arity Keyword.intern method and clojure.core/keyword fn should be left intact, so as to provide an escape hatch for those that really do need colon-prefixed keywords.

        Attachments

          Activity

            People

            • Assignee:
              cemerick Chas Emerick
              Reporter:
              alex+import import
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: