Hello Keith,

2009/2/6 Keith Bennett <keithrbenn...@gmail.com>

>
> Tzach -
>
> Cool!
>
> I had to do some things to get it to work.
>
> * Reversed the order of parse-digit and abs functions.
>
> * Added call to -main at the end.  By the way, what is the
> significance of the hyphen in the function name?


Please, consider that it is a bad idea/practice (in general) to emit calls
to functions in a namespace/lib.

Indeed, if I try your version of the code in eclipse with clojuredev (but
that would be the same problem with other IDEs as well), whenever the file
gets recompiled, it will launch the main function ! Because in clojure,
compile is really a 'compile and 'load feature.

I think the -main function is here to implement the main() method of the
java class that the :gen-class directive of the namespace declaration has.

Since there has been no specific prefix specified, all functions that will
be part of the generated class will just begin with -.

If Tzach had put a prefix to, say sudoku , then the main java method method
would have been mapped to the sudoku-main clojure function. Please see
http://clojure.org/compilation and the docstrings of ns and gen-class for
more detail.

Regards,

-- 
Laurent


>
>
> * The call to msg-box in the About action had an extra parameter,
> nil.  I removed it.  I presume the call used to be to the JOptionPane
> static method call, and after refactoring it to use the shared msg-box
> function, you forgot to remove the nil?
>
> I pasted a copy of my version at http://www.pastie.org/381649.
>
> Thanks,
> Keith
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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
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