On Jan 15, 2009, at 10:51 AM, Chouser wrote:
> > On Mon, Jan 12, 2009 at 10:58 PM, aria42 <ari...@gmail.com> wrote: >> >> Couldn't it have access to the other bindings so far like let? And >> then just have the order of options reflect the partial order induced >> by dependency? So is this possible... >> >> (with-command-line *command-line-args* >> "my-program" >> [[size "The size of something" #(if % (Integer/parseInt %) 99)] >> [picture "Path to Picture" #(load-picture % size)]] >> (do-stuff-with-picture)) > > I guess I'm not convinced it's good to have code mixed in with the > command-line specs like that. Can you show me your real-world > example? This is an interesting example. I don't imagine anyone would have a problem supporting the conversion of Strings to another basic type such as an Integer, but jumping from String to Picture from within the command-line spec is a bit steep. Perhaps for built-in types, the command-line spec should support defining the destination type and handle the conversion from string. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---