Re: Does Clojure has a compiler
As the other posters mention, Clojure does have a compiler. However, you don't always need to use it explicitly. Clojure will compile all input before executing it and once it's compiled it runs with the exact performance it would if it had been compiled ahead of time. There's no interpreted layer in Clojure as there is in some other languages. Some users like to pre-compile files (to obfuscate code, to speed startup time) and others prefer pure source distribution (smaller, more compatibility between versions). I would recommend not worrying about it unless you have a specific reason to do it, but neither direction would be "wrong" or "non-mainstream." Sometimes the toolchain you're using makes one way easier or harder (slightly). For example, I've noticed folks using maven tend to pre-compile whereas folks using leiningen tend not to, but either way is possible with both tools. In the end, it's mostly just a matter of taste. Tom On Aug 25, 7:17 pm, HB wrote: > Hey, > Both Groovy and Scala have a compiler to produce class files. > Does Clojure has a compiler? > Do Clojure files are compiled usually? > Thanks. -- 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
Re: Does Clojure has a compiler
Yes, clojure has a compiler that can compile directly to class files. There's more information here: http://clojure.org/compilation and a short demo that you can try here: http://www.rlmcintyre.com/iassac-gouy.tar.bz2 or http://www.bortreb.com/iassac-gouy.tar.bz2 --Robert McIntyre On Wed, Aug 25, 2010 at 10:17 PM, HB wrote: > Hey, > Both Groovy and Scala have a compiler to produce class files. > Does Clojure has a compiler? > Do Clojure files are compiled usually? > Thanks. > > -- > 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
Re: Does Clojure has a compiler
On Wed, Aug 25, 2010 at 7:17 PM, HB wrote: > Both Groovy and Scala have a compiler to produce class files. > Does Clojure has a compiler? Yup. See the recent thread called "AOT compilation newbie mistakes" for both the way to do it and some of the issues you may run into. Several people prefer using a build tool like Leiningen tho' (I find that easier to work with than command line compilation): http://github.com/technomancy/leiningen Then you can just do: lein new project cd project lein test -- to run the unit tests for your project lein compile -- to compile to .class files lein jar -- to create a JAR file etc. -- Sean A Corfield -- (904) 302-SEAN Railo Technologies, Inc. -- http://getrailo.com/ An Architect's View -- http://corfield.org/ "If you're not annoying somebody, you're not really alive." -- Margaret Atwood -- 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
Does Clojure has a compiler
Hey, Both Groovy and Scala have a compiler to produce class files. Does Clojure has a compiler? Do Clojure files are compiled usually? Thanks. -- 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