Operator-functions need to fully mimic real functions
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 132
- Forks
- 9
- PR merge metrics
- No merged PRs in 30d
Description
Operator-functions are things like + or <:
(+ 2 3)
We need to be able to use them in all the same ways as normal functions, including this following.
Pass by name:
(array.filter <)
Property notation:
(+.apply `(1 2 3))
Spread:
(* ...`(3 4) `(5 6))
Supporting this requires the following components:
- Impostor functions (trivial, partly implemented, see
operators.jisp) to be embedded with.toString - Hoisting and embedding mechanism: already implemented, will need a few tweaks for this
- Detect when the operator is referenced a non-standard way (one of the ways listed above), trigger replacement and embedding
- Replacement: replace the operator glyph with the name of the impostor function
- Treat impostor function names as service variables and guarantee that they don’t clash with user-defined names in any scope
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 with operators.jisp and review the existing impostor-function implementation, then trace the already implemented hoisting and embedding mechanism. Map how non-standard operator references are detected and replaced, and verify completion with the pass-by-name, property-notation, spread, embedding, and name-collision requirements described in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100