squint-cljs / cherry

Experimental ClojureScript to ES6 module compiler
https://squint-cljs.github.io/cherry
558 stars 22 forks source link

Consider emitting JS splice operator to optimize varargs functions #31

Open borkdude opened 2 years ago

borkdude commented 2 years ago

Questions: is splice supported everywhere now? What do we gain, what risk do we take by optimizing this?

mk commented 2 years ago

is splice supported everywhere now?

No IE 11, but everything else seems to be ok (including Edge which afaik is the default browser on windows now): https://caniuse.com/mdn-javascript_operators_spread

borkdude commented 2 years ago

Cool!

mk commented 2 years ago

A small amendment: IE 11 also only has partial support for es6 https://caniuse.com/es6 (which the splice operator is part of), for example no support for es6 class https://caniuse.com/es6-class so it really seems like there’s no compatibility downside to adopting it.

borkdude commented 2 years ago

Yeah, IE is dead now right?