I like the idea of a scheme like this. 

On Oct 8, 2012, at 1:44 AM, Jonathan Fischer Friberg <odysso...@gmail.com> 
wrote:

> Hi,
> 
> In my opinion, cross-compiler projects is way too complicated to pull off. 
> When they really shouldn't be.
> Therefore, I'm proposing the following file ending scheme:
> 
> .clj - detected by all compilers. In a cross-compiler project, .clj files 
> contains code not specific to the compiler.
> 
> .cljj - detected by the jvm compiler, contains jvm specific code.
> 
> .cljs - detected by clojurescript, contains clojurescript specific code.
> 
> .cljclr - detected by clojureCLR, ...
> 
> and so on.
> 
> It's important to note that the actual content of the files is not checked. 
> That is, a .clj file can still
> contain compiler-specific code.
> Moreover, the point of this scheme is not the actual file endings, but the 
> fact that each compiler has it's own file ending in addition to .clj.
> 
> The advantages of this scheme are:
> 
> 1. Cross-compiler code becomes ridiculously easy to separate. Say you want to 
> draw something on-screen, using java2D in the jvm, and a canvas in javascript.
> Then simply create a draw.cljj file for the java2D code, and a draw.cljs file 
> for the canvas code. Easy! 
> 
> 2. Backwards-compatible with most existing projects. 
> Since .clj is still detected by all compilers, and .cljs is detected by 
> clojurescript, existing projects will still be correctly detected and 
> compiled.
> 
> 
> So, what do you think?
> 
> Jonathan
> -- 
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with your 
> first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to