I like the addition of keyword params but using a json object to store the key params at runtime adds some overhead that I'm wondering if we could avoid. Could we make the compiler generate regular JS functions with ordered signatures? For example:
(ps (defun f(&key a b)))
would turn into:
function f(a b) { }
and the compiler would take care of detecting function calls and generating params in the right order. So:
(ps (f :a 1 :b 2)) => f(1,2)
while
(ps (f :b 1 :a 2)) => f(2, 1)
What do you guys think?
Daniel
p.s. This may sound like excessive optimization, but on our project efficiency is critical and we do a ton of profiling. We have some functions that are good candidates for &key signatures, but not if they get slower.