I've encountered a problem when creating namespaced keywords using the
literal syntax, specifically using keywords which start with numbers.
If I try using the literal syntax, entering the following at the REPL, I
get the exception which follows it:
:a/0
;= clojure.lang.ExceptionInfo: NO_SOURCE_FILE [line 1, col 5] Invalid
keyword: :a/0. {:type :reader-exception, :ex-kind :reader-error, :file
"NO_SOURCE_FILE", :line 1, :col 5} ...
If instead I use the the keyword function, it produces the desired result:
(keyword "a" "0")
;= :a/0
It seems I can get away with almost anything using the keyword function.
For example:
(keyword "a" "0/1")
;= :a/0/1
I'm wondering then, what is the "correct" behaviour if there is such a
thing in this case? I know that in Clojure the behaviour appears once again
to be slightly different, and the main docs seem to cater more to Clojure
than to CLJS.
Thank you,
Ali
--
Note that posts from new members are moderated - please be patient with your
first post.
---
You received this message because you are subscribed to the Google Groups
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/clojurescript.