ClojureScript

Bug in keyword recognizer

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Declined
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None

Description

I seem to have stumbled across a bug in keyword recognition in ClojureScript. The lines below show the input and the output from cljs.reader/read-string. The first line is okay but others are not. It seems to me that only the first and last parts separated by '/' are being included in forming the keyword.

":foo/:bar" :foo/:bar
":foo/:bar/:baz" :foo/:baz
":foo/:bar/:baz/:qux" :foo/:qux

Clojure handles these input correctly (nothing missing). I am not sure if keywords can have embedded "/:" in them but considering Clojure's handling of it, it would be nice nice if CLJS handled it similarly as well.

Activity

Hide
Jozef Wagner added a comment -

In my opinion this is not a bug, as '/' has a special meaning. From the clojure documentation:

'/' has special meaning, it can be used once in the middle of a symbol to separate the namespace from the name, e.g. my-namespace/foo

Show
Jozef Wagner added a comment - In my opinion this is not a bug, as '/' has a special meaning. From the clojure documentation:
'/' has special meaning, it can be used once in the middle of a symbol to separate the namespace from the name, e.g. my-namespace/foo
Hide
David Nolen added a comment -

This also does not seem like a bug to me. The Clojure reader allows some things which are not documented to actually work.

Show
David Nolen added a comment - This also does not seem like a bug to me. The Clojure reader allows some things which are not documented to actually work.
Hide
Praki Prakash added a comment -

Fair enough and thanks for the documentation link.

Show
Praki Prakash added a comment - Fair enough and thanks for the documentation link.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: