Tensegritics / Tensegritics/ClojureDart
Stop generating dart functions
Nobody has claimed this yet.
- Dominant language
- Clojure
- Stars
- 1.6k
- Forks
- 119
- PR merge metrics
- No merged PRs in 30d
Description
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:
- Dart overcaptures https://github.com/dart-lang/sdk/issues/36983
- it would simplify the compiler, the generated code (we wouldn't need to consider Function on the fast path -- Functions would remain callable) and the mental mode
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)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the compiler paths that emit Clojure functions as Dart functions or classes, then read the linked Dart SDK issue about overcapture. The work is complete when generated functions consistently use classes, statically known Function calls retain their no-overhead path, and magicasting to Function remains supported.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- clojure, dart
- Domain
- compilers
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100