Hi,
  I've got some suggestions for improving command-line.clj...

It would be great if you could provide a function to be called with
the value of the option and the result of that function binds to the
variable. This would take care of the annoying stuff like calling
(Integer/parseInt intAsStr) to convert to numerics but also things
like loading resources

(with-command-line *command-line-args*
  "my-program"
  [[picture "Path to Picture" (fn [path] (load-picture path))]]
  (blah))

Currently, you'd need to do something like this, where you might re-
def the var

(with-command-line *command-line-args*
  "my-program"
  [[picture "Path to Picture" "/default/path"]]
  (def picture (load-picture picture))
  (blah))

Unless there's something I'm missing.

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