[
https://issues.apache.org/jira/browse/STORM-436?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14519784#comment-14519784
]
ASF GitHub Bot commented on STORM-436:
--------------------------------------
Github user knusbaum commented on the pull request:
https://github.com/apache/storm/pull/534#issuecomment-97513417
I'm generally in favor of this. It's something that's bugged me for a
while.
I did a preliminary review on a portion of the changes. Mostly just some
minor spacing and stuff.
One thing I'd like is to get rid of `:use` completely, if we're going to
refactor the ns forms. Clojure devs discourage its use in favor of `(:require
whatever.namespace :refer :all)`.
More consistency with which namespaces we're requiring `:as` something and
which ones we're importing wholesale with `:use` or `:refer :all` would be
nice. I see sometimes you `:require` `backtype.storm.util` and sometimes you
leave it in a `:use` They don't all have to be one way or the other, but I get
the sense that the ones you've chosen to change were chosen arbitrarily (Or
maybe just accidentally skipped over; there's a lot to change).
We should probably also put a namespace style policy in writing, just to
make it easy for others to follow.
> Clean up Clojure namespace declarations
> ---------------------------------------
>
> Key: STORM-436
> URL: https://issues.apache.org/jira/browse/STORM-436
> Project: Apache Storm
> Issue Type: Improvement
> Affects Versions: 0.9.2-incubating
> Reporter: Daniel Compton
> Priority: Minor
> Labels: newbie
>
> Some of the Clojure namespace declarations in the storm project are messy and
> non-idiomatic.
> https://github.com/apache/incubator-storm/blob/master/storm-core/src/clj/backtype/storm/ui/core.clj#L18-L38
> is a good example of this.
> There are a few things I'd like to improve:
> 1. Coalesce multiple use/require/import's into a single use/require/import.
> 2. Order imports use, require, import.
> 3. Optionally, replacing use with some mix of
> * [... :refer :all]
> * Referring just the vars that are used
> * Qualifying the namespace imports
> Is there a reason why the namespaces were done in the way they have been?
> What would be the preferred way to do 3?
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)