Here's a patch with the fn* validations I could think of. It seems to cause the compilation time to increase by a measurable amount, which I find quite surprising (even though it's to be expected that there will be quite of few fn* forms in CLJS sources). I'd love to know if it's just on my box (let's hope so). If validations really have that sort of effect, I'm thinking about refactoring the analyser so that they can be turned on (which should also be the default) and off (for particularly fast compilations).
The issue is actually a bit subtle for example:
(defn foo "name")is valid Clojure - however this doesn't work in ClojureScript. In this case ClojureScript generates the following:
function () { switch (arguments.length) { } throw (new Error("Invalid arity: " + arguments.length)); }(defn foo "name")function () { switch (arguments.length) { } throw (new Error("Invalid arity: " + arguments.length)); }