Warning for unannotated optional arguments.
Nobody has claimed this yet.
- Dominant language
- Racket
- Stars
- 575
- Forks
- 106
- Avg merge
- 2h 1m
- Merged PRs (30d)
- 2
Description
As a TR user I'm glad that optional arguments don't need to be documented in a require/typed form, but when writing code I'd rather have a warning if I forget to annotate an optional argument.
(: f (->* [Natural] [] Natural))
(define (f n #:foo [x 0])
x)
;; Should raise a compile-time warning, or error with the right commandline flag
(This'd help prevent bugs like https://github.com/racket/plot/pull/12)
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 reproducing the shown typed function with an optional #:foo argument and inspect how require/typed handles optional arguments. Define the warning or command-line-controlled error behavior, then verify that the example reports the unannotated optional argument without rejecting correctly annotated code.
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
- Mostly clear
- Newbie friendliness
- 25/100