On Aug 16, 2009, at 6:29 PM, Stephen C. Gilardi wrote: > On Aug 13, 2009, at 4:52 PM, Chas Emerick wrote: > >> I've actually been using it at the REPL here and there, and I've >> found >> it pretty pleasant -- it's a very pretty way to hint args compared to >> #^, and arg:Type ordering makes for easy readability (e.g. you can >> very easily scan an arg form and see what the names of the args are, >> as opposed to "actively" parsing them due to #^ hints or scanning for >> the (relatively unobtrusive) colon in the Type:arg style). >> >> Code below. > > Very cool! I like this a lot. Would you be up for writing some doc > strings and including it in clojure.contrib.def?
Yeah, I could do that. I don't actually think it's practical on its own, though. My one concern is that using two hinting syntaxes in parallel (e.g. s:String in defh forms, but #^String s everywhere else) is, to put it lightly, painful. What I might be able to do is define alternatively-hinted versions of let, for, doseq, etc., and rebind clojure.core/destructure during the evaluation of those macros so that the s:String style can get layered on top of binding forms (more) uniformly. Feels hacky, though....thoughts? - Chas --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---