[ClojureScript] Re: Inconsistency in creating keywords

2018-03-03 Thread outrovurt
Thank you for the background, it explains everything. So, if you want to be really safe and "to the spec" right now, then I would > say, don't use leading digits in keywords. Realistically though, we're > never going to disallow those and eventually I expect them to be > "officially" ok. >

[ClojureScript] Re: Inconsistency in creating keywords

2018-03-02 Thread AndyR
You should be extra careful in CLJS when creating keywords with multiple slashes. They currently behave different from CLJ. Logged here: https://dev.clojure.org/jira/browse/CLJS-2120 On Thursday, March 1, 2018 at 1:14:34 PM UTC+1, outr...@gmail.com wrote: > > I've encountered a problem when

[ClojureScript] Re: Inconsistency in creating keywords

2018-03-02 Thread Alex Miller
There's actually a lot of history and several open tickets about this specific question of whether keywords can start with a digit. The original intent (and the reader reference page) is that it would match symbols in that leading digits are not allowed. However, there is a bug in the regex

[ClojureScript] Re: Inconsistency in creating keywords

2018-03-01 Thread outrovurt
Thank you both for the links, especially the FAQ page. As an aside I was looking for something like the namespace function and am glad I found it. Something is still confusing me however. If we follow the reader docs which Alex posted, "Symbols begin with a non-numeric character", and "Keywords

[ClojureScript] Re: Inconsistency in creating keywords

2018-03-01 Thread Alex Miller
On Thursday, March 1, 2018 at 9:34:29 AM UTC-6, Thomas Heller wrote: > > Clojure follows the principle of "Garbage in, Garbage out" for a lot of > internal functions. > I would say "unspecified input / unspecified output", however this is not one of those cases in my opinion. The keyword

[ClojureScript] Re: Inconsistency in creating keywords

2018-03-01 Thread Alex Miller
Regarding the keyword function, see the faq at https://clojure.org/guides/faq#unreadable_keywords On Thursday, March 1, 2018 at 6:14:34 AM UTC-6, outr...@gmail.com wrote: > > I've encountered a problem when creating namespaced keywords using the > literal syntax, specifically using keywords

[ClojureScript] Re: Inconsistency in creating keywords

2018-03-01 Thread Thomas Heller
Clojure follows the principle of "Garbage in, Garbage out" for a lot of internal functions. Meaning you are responsible for ensuring that you only use valid data when calling those functions as the validation itself carries overhead which the core fns should not have. :a/0 fails because the