Tensegritics / ClojureDart

Clojure dialect for Flutter and Dart
1.43k stars 91 forks source link

Stop generating dart functions #289

Open cgrand opened 1 year ago

cgrand commented 1 year ago

Currently clojure functions compile to either classes or functions.

Here I propose we get rid of emitting Dart functions and always compile to classes because:

However the compiler would keep the special case that when it statically determines something in function position to be a Function, it will invoke it with no overhead.

We should double-down on magicasting to Function (we need to anyway)

cgrand commented 1 year ago

The doc for build on State also warns against accidental this capturing.