2009/6/2 Stephen C. Gilardi <squee...@mac.com>:
>
> On Jun 2, 2009, at 8:59 AM, Chouser wrote:
>>
>> 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 agree on the etiquette thing. I planned to track you down and ask you.
> Thanks for the permission! In clojure.contrib.core, Laurent put in a clause
> at the top giving blanket permission. In that case I marked off a section
> for my contribs (dissoc-in and new-by-name) so anyone who wants to ask about
> them can find me.

There also still the possibility to have, per namespace, a file that
just loads other files (belonging to the same namespace) with one
contributor per file. But I see this as counter productive because
there will be a lot of little files per namespace, and sometimes there
will be problems with the orders of the functions definitions
eventually leading to the creation of several files per namespace per
contributo ... so not a so great idea after all :-)

>
>>> 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?
>
> It is intentional. I see them as having slightly different roles given the
> more flexible types that main can see vs. the "just strings" that -main
> (<prefix>main in the general case) would see. In cases where they can be
> unified it can be done easily with a small stub, a def, or a
> clojure.contrib.def/defalias.
>
> I think it would be a cool idea for "ns" to support a ":main" clause that
> would let you specify the function to run when this namespace is executed
> using "run". I would default it to "main", but it could be specified as
> "-main" if that's appropriate or another name with more meaning in general.
>
> --Steve
>
>

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