3 ms·
For Clojure, I know there has been talk about this. Clojure allows you to insert Type Hints, which allows Clojure to remove reflection in certain cases, which i
by Skinney 11y ago
For Clojure, I know there has been talk about this. Clojure allows you to insert Type Hints, which allows Clojure to remove reflection in certain cases, which improves both runtime and compile speed. Typed Clojure should be able to insert Type Hints automagically for you since you provide type information anyway, although it doesn't do that today.
For ClojureScript there really isn't any performance optimization to be done, as far as I know. asm.js doesn't really help out high-level functional languages like ClojureScript.
- bostonOU 11y agoI believe ClojureScript only supports boolean type hints/performance optimization. Other type hints are "supported" but don't do anything.
- Skinney 11y agoYeah. They are not really necessary in a Javascript VM that is optimized for these sort of languages anyway.
- swannodette 11y agoThis is not entirely accurate, the ClojureScript compiler actually internally propagates type information for further optimization. And nothing precludes a Typed ClojureScript which feeds even more information to the compiler.