Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discussion: Use namespace alias instead of :refer :all #18

Open
tendant opened this issue May 17, 2014 · 2 comments
Open

Discussion: Use namespace alias instead of :refer :all #18

tendant opened this issue May 17, 2014 · 2 comments

Comments

@tendant
Copy link

tendant commented May 17, 2014

Just want to start the discussion about one code convention in buffy.

In most buffy code, :refer :all used a lot for including functions in other namespace. I suggest to review this code. Since it might give new user a lot confusion. Sometimes it creates potential issue, especially when there is a function has the same name as a function from clojure.core namespace.

For example, some test code (from: https://github.com/clojurewerkz/buffy/blob/master/test/clojurewerkz/buffy/dynamic_test.clj#L18):

string-decoder (frame-decoder [buffer offset]
                         length (short-type)
                         string (string-type (read length buffer offset)))

read function also exists in clojure.core namespace. If this code is copied to some different place, it is very hard to tell the read function should be FrameType/read, instead of clojure.core/read.

If you think this change is appropriate, I can make the code change and send the pull request.

@michaelklishin
Copy link
Member

@tendant this is not a major issue but please submit a PR.

@bobby
Copy link
Contributor

bobby commented Dec 19, 2019

@tendant and @michaelklishin, I encountered the same minor issue, and included fixes in PR #33.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants