- functions,without dependencies ,for example $function $accumulator operators
- has many features like immutable data structures etc
- very fast
The reason is its big language to wrap inside 1 function,its like loading all the language in each call,and its slow.
cMQL provide 3 things
- allows functions to have function dependencies (useful from wrappers,and wisp)
(so we avoid code repetetion,and slow code)
- generates 1 js functions,from nested $function calls (usefull fro cMQL wrappers) (if we nest like 5 js calls,MongoDB will run only 1,for perfomance reasons)
- compiles wisp to js
We can wrap small js functions,under cMQL(Clojure functions).
And then we can combine them.
Clojurescript like languages
One language that does exactly this is Wisp
And the wisp compiler produces js code