ClojureDart icon indicating copy to clipboard operation
ClojureDart copied to clipboard

Add other arities for IFn protocol

Open pfeodrippe opened this issue 2 years ago • 4 comments

Add other arities for IFn protocol as we have in Clojure and Clojurescript.

Is there some limitation in Dart for it? If there is not, I can open a PR for it o/

pfeodrippe avatar May 14 '22 00:05 pfeodrippe

There's no limitation but is there any strong reason to align? Is there a strong case of existing cljc code whose performance would degrade if the threshold is at 10 rather than 20?

cgrand avatar May 17 '22 10:05 cgrand

There's no limitation but is there any strong reason to align? Is there a strong case of existing cljc code whose performance would degrade if the threshold is at 10 rather than 20?

It's not for performance, it's to make it work with SCI (or other libraries which implement IFn in full) without having to creating special cases for it, e.g. https://github.com/babashka/sci/blob/1dc44b30044e387c0069bc051a511d6fc889f3f1/src/sci/impl/vars.cljc#L326

I can open the PR tonight if you want, thanks for the great job you both are doing o/

pfeodrippe avatar May 17 '22 10:05 pfeodrippe

ok, I will review your pr

cgrand avatar May 20 '22 08:05 cgrand

Maybe.. this is not a good first issue. I tried very naive PR in #65.

ruseel avatar Oct 26 '22 13:10 ruseel