Skip to content

Instantly share code, notes, and snippets.

@kiras
Created June 19, 2010 17:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kiras/445066 to your computer and use it in GitHub Desktop.
Save kiras/445066 to your computer and use it in GitHub Desktop.
Which is right?
lein new test-project
lein new test_project
What is confusing me is that it seems like for filenames and directories, the convention is to use underscores in place of hyphens, while within clojure code itself, hyphens are used.
If this is true, it would seem to suggest the second way is the right way.
However, although all the files and directories follow the underscores instead of hyphens approach when using the second way, the project name in the code does the same. In other words, I get (defproject test_project (etc.)) in project.clj and (ns test_project.core) in core.clj. Is this right? Should it be (defproject test-project) and/or (ns test-project.core) instead?
Finally, in experimenting with some of the lein tasks, I decided to use lein uberjar. To do this, I had to define -main in core.clj and add :main test_project.core in project.clj. :main test-project.core did not work, even using the first way, where test-project was used throughout.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment