<i>I guess I would be concerned about compiling to JS because you're adding another layer of abstraction on an already fussy language (when being interpreted by the browser). It's hard enough to find bugs as it is.</i><p>On the other hand, mechanically generating the code you've abstracted away will make sure you only get the same bugs every time. ;)