On 23.01.2009, at 22:47, Stephen C. Gilardi wrote:

> Are you pointing out that closures as well as macros may require  
> same-world compilation?

Yes.

> When compiling that to bytecode, one could implement (effectively):
>
>       (declare-private _my-factor-311)
>       (defn foo [x] (* _my-factor-311 x))
>
>       (defn _static-initialize []
>               (.bindRoot (var _my-factor-311) (* 3 (Math/sqrt 2) (Math/log 
> 42))))
>
> and arrange to call a lib's _static-initialize function whenever a  
> compiled lib is loaded.

Certainly, but I guess this would be extra work for the compiler,  
because it would handle a let differently depending on whether it  
occurs at the top level of a module or not.

Konrad.


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