Hi, On 10 Feb., 15:54, CuppoJava <patrickli_2...@hotmail.com> wrote:
> That one establishes dynamically scoped variables. Can't there be > another Clojure function that provides lexically scoped variables? > > I actually don't know of any lisp/scheme system that provides a way to > introduce lexically scoped variables at runtime. Do you know if > there's a fundamental reason against doing so? Something which modifies &env so to speak? Dunno. I would expect the lexically scoped variables to be hard-wired by the compiler. Similar to what happens now with Vars w/o ^:dynamic. That means you'd have to transform the byte code at runtime based on what the runtime function's input is. I remember some OCaml docs back in ye olden days, which stressed that "let x = 5 in ..." does create a variable, which has the value 5, but is really just a name for the value 5. So it is substituted by the compiler directly, where its name is used. But I'm not a language (let alone compiler) guy. So ignoring my explanations probably doesn't do any harm. :) 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