This page is not created by, affiliated with, or supported by Slack Technologies, Inc.


With, one thing we could consider is adding a compiler option akin to :static-fns, perhaps with a name like :infer-fn-return-type or somesuch, which is disabled for functions defined in the REPL. (The rationale would be to avoid code based on such definitions becoming invalid if the user re-defines, changing the inferred type—this was discussed a little in CLJS-1997). By doing so, we might be giving up on some good compiler warnings but instead favoring correctness while in the REPL. This could become more important if we make more use of inferred return types during code gen. See which feels like giving inferred string importance just like inferred boolean.


Type inference could potentially flow into the then branch of an if, based on predicates used in the test. Wondering if there is anything that could go wrong with this kind of change: