Tensegritics / Tensegritics/ClojureDart
Transfer type inference of the expression to the var
Open
Nobody has claimed this yet.
pondering-design
- Dominant language
- Clojure
- Stars
- 1.6k
- Forks
- 119
- PR merge metrics
- No merged PRs in 30d
Description
Brain dump on this behavior:
- Core issue
(def x (constructor....))x isdynamic- or more generally the inference of the expression doesn't transfer to the var
- thus the user has to type hint the var itsef
- Why is it like that?
- Because so does Clojure
- Because if you redef and that the inferred type change you have to recompile every code referring this var (and this may cascade) thus promising nothing is easier.
- Right now we transitively recompile all dependants so we could transfer the inferred type without adding complexity. It will impact REPL design though, maybe stick to a broadly sweeping dependants recompilation for REPL too.
- Conceptually the inferred type may be too precise when you think of types as contracts.
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 reviewing the issue's discussion of (def x (constructor....)), inferred types, redefinition, and dependent recompilation. Determine the design for transferring an expression's inferred type to its var while accounting for REPL recompilation and type-contract precision; done means the behavior and recompilation implications are resolved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- clojure, dart
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100