Yes - I actually do something similar for arrow functions (eg. (a,b,c) vs (a,b,c)=>a+b+c)
However that's not too bad because doing (a,b,c) in normal code is very rare so it doesn't hurt to take a small performance hit when parsing. [a,b,c] in normal JS is super common though so the last thing we want to do is make that noticeably slower :)
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Yes - I actually do something similar for arrow functions (eg.
(a,b,c)
vs(a,b,c)=>a+b+c
)However that's not too bad because doing
(a,b,c)
in normal code is very rare so it doesn't hurt to take a small performance hit when parsing.[a,b,c]
in normal JS is super common though so the last thing we want to do is make that noticeably slower :)