Hi, On Oct 14, 10:30 am, Garth Sheldon-Coulson <g...@mit.edu> wrote:
> > Huh? I did? > > Yes, but I didn't explain what it was for at the > time.http://groups.google.com/group/clojure/browse_thread/thread/b3b184bc5... I did indeed... Now I remember. > One example of an option is whether Mathematica lists (which earlier I > called expression-sequences) will be parsed into Clojure seqs or Clojure > vectors. Another example is whether or not Mathematica first-class > functions, whenever encountered, will be made callable from Clojure by > wrapping them in a Clojure first-class function. A third example is whether > Mathematica hash-maps, whenever encountered, will be converted into Clojure > hash-maps or left as simple colls of pairs. May I play the devil's advocate? > There are 10-15 options, most of which the defaults are fine for, but all of > which I want the user to be able to set. Why do you want to allow that? What is the benefit for the user? Does the benefit warrant the increase in physical complexity (the implementation is harder to get correct) as well as the increased psychical complexity ("Let's see what options there are...(5 Screens later)... WTF?", "The Paradox of Choice"). At least for the parser I would prefer a predictable behaviour. With these options the same Mathematica code might end up in many different representations. Possibly in a non-transparent way. (binding [*options* (assoc *options* :foo :bar)] (frobnicate stuff)). But the user doesn't know, that frobnicate does look like this inside: (binding [*options* (assoc *options* :foo :baz)] (do-real-frobnicate stuff)) and is looking for his mistake.... So the upshot is: I also don't know how to solve this problem in a satisfying way. :] > Is bound-fn in one of the clojure github branches? Or for the time being is > the best way to get it simply to download it from assembla and stick it in > my project library? I haven't put up my github branch for bound-fn. Just download the patch and stick the code somewhere in your library for now. > I'm probably not understanding what's involved in dynamic binding, but why > would the overhead on "installing" the function-local bindings of bound-fn > be worse than mapping an argument symbol (i.e. the "options" symbol in (defn > foo [expression options] ...) to the data structure passed as that argument? > In both cases the data structure is immutable, so no copy should have to be > made... ? The new bindings are for example checked for valid entries (in case a validator is set for a Var). So there is more going on than just putting a map into the right place. Sincerely Meikel --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---