This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-09-14
Channels
- # admin-announcements (5)
- # alda (2)
- # beginners (26)
- # boot (30)
- # cider (8)
- # clojure (49)
- # clojure-argentina (1)
- # clojure-berlin (1)
- # clojure-boston (1)
- # clojure-italy (11)
- # clojure-norway (3)
- # clojure-russia (116)
- # clojurescript (156)
- # clojurex (4)
- # clojutre (9)
- # core-async (6)
- # datomic (18)
- # emacs (1)
- # events (4)
- # hoplon (159)
- # ldnclj (13)
- # luminus (4)
- # off-topic (1)
- # re-frame (14)
- # reagent (76)
yeah, but if I try to have two files with the same ns declaration it doesn't seem to work
@mosho: are you using Clojure or ClojureScript?
If you are using Clojure, see this answer on SO - http://stackoverflow.com/questions/4690758/splitting-a-clojure-namespace-over-multiple-files
Which makes use of in-ns
instead of ns in the helper classes, and load
to load the helper classes in the main file
@mosho that is not recommended. There were discussions about that on the clojure channel.
@surreal.analysis: yeah, I saw that, but I'm using cljs
Out of curiosity, why are you trying to split namespaces across files?
It generally seems like it is not the recommended way unless you are creating a large standard library (e.g. clojure.core)
in my case, I have several components that make up a page, and would like them to each be in its own file, but having one namespace to hold them. like "my.project.components" seems like the right idea
Tha seems a very Java way of organizing code, no criticism intended, I also like to split code like that