Lighter-weight aliasing for keywords

Description

It is useful to make qualified keywords, and particularly so with spec. Using namespace aliases helps a lot in working with a lot of qualified keywords. However, currently creating an aliased namespace requires that the namespace actually exists.

This ticket is a placeholder to do something more with lighter-weight aliasing for keywords. Details TBD.

Environment

None

Activity

Show:
Herwig Hochleitner
September 27, 2017, 1:05 PM

that's a pity. but maybe 1.10 will have a shorter release time ...

In any case, I'll be very interested in Rich's idea to do this outside of the ns clause and still have it fit well with clojurescript (or even clojure, for that matter, ...)
Do you have any rationale, why growing ns for this is a bad idea?

Alex Miller
September 27, 2017, 1:07 PM

ns already does way too much stuff and we don't have any desire to make it do more.

Herwig Hochleitner
September 27, 2017, 6:20 PM

Since ns is essential to how a namespace is set up in clojure, I'd imagine a fix for that problem (of ns doing too much) to imply some rather drastic changes to the state of the art. As we won't break ns, I'd imagine either some sort of ns2 or a way to do namespace setup outside of the ns clause. I'm curious either way.

Since I know, that Rich will not be hassled about his hammock time, I'll lay off this for now. I'll be sure to check back as the next round of alphas goes out. I also hope for some productive discussion in the meantime.

import
October 11, 2018, 10:51 AM

Comment made by: tslocke

Is there any reason such a mechanism would be limited to keywords? I have a place in my code where it would be very useful to have such a feature for symbols.

Also, related: a way for pr-str (and similar) to be configured to use short versions of namespaces. Debug output can be awfully noisy, even with namespaced maps.

Alex Miller
October 11, 2018, 4:29 PM

No particular reason - usually for stuff like this we make it work the same for any ident (keyword or symbol).

Assignee

Unassigned

Reporter

Alex Miller

Labels

Approval

Vetted

Patch

None

Affects versions

Priority

Critical
Configure