Colin, Got it--this setting is relevant to use of a debugger. I was trying to see something from vanilla and Leiningen repls. Thank you for taking so much time to explain. (My current debugger is (print (format ...)). Have to upgrade.)
-Marshall On Wednesday, November 13, 2013 5:16:27 PM UTC-6, Colin Fleming wrote: > > Hi Marshall, > > You'll only see a difference due to locals clearing if you're stepping > with a debugger and looking at locals in your local stack frame or in the > frames above it. In your example, the ability to pause when an exception is > thrown is a capability your debugger provides. Cursive does provide this > (although I need to test it thoroughly, most of the functionality is > provided by IntelliJ and I haven't tested it all with Clojure yet), I'm not > sure about other debuggers. So if your debugger provides that capability, > when you pause on the thrown exception, if you didn't have locals clearing > disabled when that code was compiled you'll see the value of n as null > since the compiler has inferred that the value is never used in the branch > you took (the branch throwing the exception) and has nulled it out. If you > had locals clearing disabled when that code was compiled, then you will > correctly see the value of n as 15, yes. > > Cheers, > Colin > -- -- 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 --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.