On Tue, Jun 2, 2009 at 7:49 AM, Stephen C. Gilardi <squee...@mac.com> wrote:
>
> On Jun 2, 2009, at 4:45 AM, Konrad Hinsen wrote:
>>
>> That looks like a perfect candidate for clojure.contrib.repl-utils!
>
> Thanks! After a little more discussion, I'd like to put it in there.

I'm never sure what the etiquette is for adding to other people's files in
contrib, but please don't hesitate to add this to repl-utils on my account.

> I see the tradeoffs as:
>
> possible negative:
>
>        - an extra name in the namespace

Eh... nobody cares.  :-)

> positives:
>
>        - the code is easier to understand
>        - the function version composes better: it's easier to call from
> other code if that were desired.

These are important, esp. the second one, at least in the general case.

> Overall I like the function/macro pair version better.
>
> Any thoughts?

Using gen-class you can have a namespace that is runnable from the Java command
line by providing a main() method.  This usually defers to a function named
"-main" that expects string arguments.  From my reading of your 'run', it looks
like you're using a function named "main" that expects symbol, string, etc.
args.  I assume this difference is intentional?

--Chouser

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