Fork me on GitHub
#clojure-dev
<
2016-04-08
>
Alex Miller (Clojure team)13:04:04

bronsa: we're talking about your proposal, will update on the ticket. re "2- no please. that would make the proposed syntax useless for e.g. Datomic schemas, for which I think this would be a good fit to reduce noise" I don't get what you're saying there at all and I suspect I just didn't communicate the question well

bronsa13:04:33

gah, nevermind about that, I read an only that isn't there

bronsa13:04:56

thought you were asking whether we should only support auto-resolving to existing namespaces

Alex Miller (Clojure team)13:04:49

no, just the fallback behavior that auto-resolved keywords support (which I think is weird for keywords actually)

bronsa13:04:35

@alexmiller: I'm not understanding -- are you talking of e.g. ::clojure.core/foo ?

bronsa13:04:53

why is that weird?

bronsa13:04:03

ah, I guess because the :: is useless?

Alex Miller (Clojure team)13:04:27

yeah, I totally don't get the point of that

bronsa13:04:37

well, it ensures that the ns does exist

bronsa13:04:45

which :clojure.core/foo doesn't

bronsa13:04:54

not sure if that ever matters simple_smile

Alex Miller (Clojure team)13:04:03

have you ever seen that used? I can't say I have

bronsa13:04:13

but I'd say it's ok as is, as a matter of consistency. the way I see it, aliases are a superset of the alias targets

bronsa13:04:53

so if (alias 'c.c 'clojure.core) ::c.c/foo works, I'd expect the mechanical un-aliased form ::clojure.core/foo to work aswell

Alex Miller (Clojure team)13:04:40

rich asked if in your proposal there is any way to autoresolve keys to the current namespace (since you removed #::) ?

bronsa13:04:55

::foo does that already

Alex Miller (Clojure team)13:04:24

so you just wouldn't use #: at all then

Alex Miller (Clojure team)13:04:33

we think it will be common for maps to have a mixture of current ns and some other ns which doesn't play as well this way

bronsa13:04:25

how would that work in your proposal? #:foo {:bar 1 ::baz 2} -> {:foo/bar 1 :user/baz 2}?

bronsa13:04:45

although I guess that's again, only true for clojure and not EDN, given the lack of pre-existing auto-resolving syntax macros, namely :: and "`" in EDN

Alex Miller (Clojure team)13:04:27

I think it's definitely a subtle part of Clojure where the "namespace part of a symbol" does and does not relate to "namespaces" (or "libs" as much of the Clojure docs calls them).

bronsa13:04:52

@alexmiller: your last point is to say being able to #:foo {:a 1 :b 2} -> #:bar {:a 1 :b 2} ?

Alex Miller (Clojure team)13:04:33

no to say you can go from {:a 1 :b 2} to #:foo{:a 1 :b 2} without changing all the keys

bronsa13:04:41

ah, gotcha

bronsa14:04:46

@alexmiller: what about #:foo{'bar 1} returning different results than '#:foo{bar 1}? that by design or an accident of the current impl?

bronsa14:04:39

the former has the advantage that the values don't need to be constants