Easy way to define wrappers
Nobody has claimed this yet.
- Dominant language
- Racket
- Stars
- 601
- Forks
- 74
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 5
Description
One often needs to define wrappers around existing functions, passing some of the same default arguments, either positional or keyword based. For example, if one wants to define a curried version of dict-ref, one has to redefine the default argument for failure:
(define ((curried-dict-ref key [default <failure-result-tbd>]) a-dict)
(dict-ref a-dict key default))
Not only is this cumbersome, error-prone and against DRY, but the docs are actually not helpful to define the correct default value.
Hence I would very much like in Rhombus a global mechanism for easily defining wrappers around existing functions with default arguments.
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
The issue provides no implementation files, tests, or entry points. Start by reviewing the curried dict-ref example and the linked dict-ref documentation, then determine the intended wrapper mechanism and its scope; done requires an agreed design and corresponding implementation and tests.
Written by the indexing model from the issue text.
Assessment
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100