Re: Why is the start function called -main

2017-09-07 Thread Cecil Westerhof
2017-09-07 7:09 GMT+02:00 Didier : > Clojure is always launched from Java, there's no way to bootstrap straight > into Clojure from the JVM. So when you launch the JVM, it always starts in > a Java main method. What Clojure does normally, is that it creates the Java > main method for you, and have

Re: Why is the start function called -main

2017-09-06 Thread Didier
Clojure is always launched from Java, there's no way to bootstrap straight into Clojure from the JVM. So when you launch the JVM, it always starts in a Java main method. What Clojure does normally, is that it creates the Java main method for you, and have it call your own main method. So it goe

Re: Why is the start function called -main

2017-09-06 Thread Cecil Westerhof
2017-09-06 23:42 GMT+02:00 Justin Smith : > To define a method in gen-class you need to use a prefix on the function > name, "-" is the default prefix > ​I have to delve a little deeper into that on a rainy day. ​ > On Wed, Sep 6, 2017, 14:41 Cecil Westerhof wrote: > >> 2017-09-06 23:27 GMT+02

Re: Why is the start function called -main

2017-09-06 Thread Justin Smith
To define a method in gen-class you need to use a prefix on the function name, "-" is the default prefix On Wed, Sep 6, 2017, 14:41 Cecil Westerhof wrote: > 2017-09-06 23:27 GMT+02:00 Matching Socks : > >> There is a hint, as to this, in the API doc of gen-class: >> >> >> https://clojure.github.

Re: Why is the start function called -main

2017-09-06 Thread Cecil Westerhof
2017-09-06 23:27 GMT+02:00 Matching Socks : > There is a hint, as to this, in the API doc of gen-class: > > https://clojure.github.io/clojure/clojure.core-api.html# > clojure.core/gen-class > ​That explains what happens, not why. ;-) -- Cecil Westerhof -- You received this message because you

Re: Why is the start function called -main

2017-09-06 Thread Matching Socks
There is a hint, as to this, in the API doc of gen-class: https://clojure.github.io/clojure/clojure.core-api.html#clojure.core/gen-class -- 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 Not

Why is the start function called -main

2017-09-06 Thread Cecil Westerhof
In C, C++ and Java the start function is called main. Why is it called -main in Clojure? -- Cecil Westerhof -- 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 member