Comment made by: bendlas
Hoping to get the conversation started on this in time for a 1.9-beta:
The rationale in my predecessor ticket, CLJ-2030, was to create a construct to allow for auto-aliasing in .cljc files, which I would like to submit as a requirement. The obvious place for cljs to declare an auto-alias is the ns clause.
So if we don't want to grow alias for that use case, I would propose to grow the ns clause with a declaration for keyword - aliases. Let's give it a working title of (:kwns-alias ..) for this comment.
:kwns-alias would be used to establish namespace aliases for ::qualified/keywords
One open question is, how :kwns-alias should interact with alias. i.e. whether the namespace of ::qualified/keyword should always expand to the same as the one of a qualified/symbol or if they should be allowed to differ. I'd argue they should always be the same, because of the rule of simplicity. That means, that
- alias will need to check if the sym is already in :kwns-alias and throw, if so
- :kwns-alias will need to also work on `qualified/keywords probably shouldn't have knws in its name any more
So what's a good name for :kwns-alias? :let maybe?