Hi Ram, your take on Clojure to JS translation seems very interesting to say the least. Thanks for sharing your work.
A few points I tripped over while reading the example: * Why are functions being defined as "join = function (...)" instead of "function join (...)"? Does this make a semantic difference? * "if { ... } else { ...} break;" is probably missing a semicolon before "break". Don't trust JS' implicit semicolon-adding ;-) * The whole function body is being wrapped in a "return function() { ...}()". Is this done in order to support implicit return? My guess is that deeply nesting such constructs could become quite performance- heavy due to the many additional function calls. * Mozilla's JS 1.7 supports a let statement[1] with lexical scoping, though implementation support outside of Firefox is scarce. Depending on your target audience and performance requirements it could be worthwhile to implement this as an optimization instead of using the "function(){...}()" trick, but only if allowed by some flag, like :features #{:let} or similar. I'm going to take a deeper look into this once I have the time. [1] https://developer.mozilla.org/en/New_in_JavaScript_1.7#Block_scope_with_let Daniel -- 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