aero icon indicating copy to clipboard operation
aero copied to clipboard

Consider using namespace qualified tagged literals

Open RickMoynihan opened this issue 8 years ago • 5 comments

I appreciate the succinct nature of the namespace free reader tags e.g. #ref but ideally these tags would be namespaced #juxt.aero/ref or perhaps just #aero/ref. clojure.org has this to say:

Reader tags without namespace qualifiers are reserved for Clojure.

And the edn-format spec re-echoes the same sentiment:

Tag symbols without a prefix are reserved by edn for built-ins defined using the tag system.

There may already be a collision here too, as integrant also defines #ref. How would one use both aero and integrant together?

RickMoynihan avatar Mar 01 '17 12:03 RickMoynihan

See also similar bug on integrant: https://github.com/weavejester/integrant/issues/12

RickMoynihan avatar Mar 01 '17 12:03 RickMoynihan

I agree and would vote for #aero/ref.

We could provide a reader option that will run in 'deprecated mode' that will match on unnamespaced keywords, giving people a compatibility option.

malcolmsparks avatar Mar 01 '17 15:03 malcolmsparks

👍 to the compatibility option and agree that ^:deprecated flags would make sense on the old functions too.

RickMoynihan avatar Mar 01 '17 15:03 RickMoynihan

I second this issue!

puredanger avatar Apr 20 '17 13:04 puredanger

I found that this is a temporary solution to using integrant ref with the aero ref

  (binding [*data-readers* {'ig/ref ig/ref}]
    (aero/read-config (clojure.java.io/resource "config.edn")
                      {:profile profile})))

This way, I can use ig/ref in my config and it will resolve.

dantheobserver avatar Jul 14 '19 21:07 dantheobserver