Re: goog.debug.Logger from clojurescript or how to hide mutability with a functional approach

2012-01-11 Thread Stuart Sierra
In general, def* forms are not supposed to be nested, although it does work for cases like this. In my limited use of ClojureScript so far, I've gotten over problems like this by having an initialization function, at the bottom of my source file, that sets up global state like loggers. -S --

goog.debug.Logger from clojurescript or how to hide mutability with a functional approach

2012-01-10 Thread Ryan Waters
I'd like to use clojurescript to set up a gclosure logger (goog.debug.Logger) similar to the closure demo [1]. The slightly modified javascript for this is below. How should clojurescript insulate the programmer from the mutability issues? 1) log level mutates a LogManager object 2) a logconsole