Tensegritics / ClojureDart

Clojure dialect for Flutter and Dart
1.38k stars 88 forks source link

Stop generating dart functions #289

Open cgrand opened 8 months ago

cgrand commented 8 months 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 7 months ago

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