This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-04-09
Channels
- # admin-announcements (1)
- # boot (225)
- # braid-chat (1)
- # cider (25)
- # cljs-dev (35)
- # cljsrn (1)
- # clojars (6)
- # clojure (81)
- # clojure-berlin (1)
- # clojure-dev (21)
- # clojure-france (2)
- # clojure-japan (6)
- # clojure-poland (1)
- # clojure-russia (10)
- # clojure-uk (3)
- # clojurescript (121)
- # code-reviews (1)
- # core-async (4)
- # core-logic (2)
- # cursive (15)
- # datomic (8)
- # hoplon (4)
- # jaunt (112)
- # jobs-discuss (35)
- # om (41)
- # parinfer (8)
- # re-frame (3)
- # reagent (4)
- # ring (2)
- # untangled (38)
On the subject of namespaced keywords, how "legal" / "defined" is it to do (keyword "foo/bar")
as opposed to (keyword "foo" "bar")
(since they both produce the same value — according to identical?
).
(the context for me here is the :identifiers
function passed into various java.jdbc
functions, that is used as (keyword (identifiers col-name))
so you could pass in (partial str table-name "/")
and get namespaced keywords out… which is useful but seems sketchy)
either is fine, not sure what the question is
The question is: can the argument to keyword
legally contain /
and is that guaranteed to be well-defined behavior?
In other words, could I rely on that not breaking in a future release of Clojure?
There have been discussions in the past about what is really legal for the argument to keyword
— things like (keyword "I have spaces")
and so on… which all "work" but violate some of the documented rules about legal keywords etc.
yeah that punts through Symbol.intern() https://github.com/clojure/clojure/blob/d5708425995e8c83157ad49007ec2f8f43d8eac8/src/jvm/clojure/lang/Symbol.java#L58
So I guess (keyword "foo/bar")
is as legal as (symbol "foo/bar")
then...
Yeah, I’m mostly concerned with legality and intent here. I don’t really want to rely on something that "just happens to work" but isn’t something that Clojure/core think should be legal
Seems fine to me
And programmatic creation of keywords that are not readable by the reader is both fine and useful
@alexmiller: if you get a chance to contact Tom Faulhaber can you let him know that the autodoc for tools.analyzer
appears to be broken? http://clojure.github.io/tools.analyzer/#type-section those types shouldn't exist anymore
How long has it been? I think that stuff regenerates in a nightly batch.