Add in `&untyped`
@soutaro is already working on this.
Since Nov 20, 2023.
- Dominant language
- Ruby
- Stars
- 2.2k
- Forks
- 256
- Avg merge
- 6d 17h
- Merged PRs (30d)
- 37
Description
Currently, *untyped and **untyped can be used to accept any amount of any type of positional and keyword arguments. However, there's no way to accept a block of any type:
def foo: () { (*untyped, **untyped) -> untyped } -> void
indicates that the block doesn't accept block parameters itself. To fix this, you need to do
def foo: () { (*untyped, **untyped) { (*untyped, **untyped) -> untyped } -> untyped } -> untyped
But that block also needs a block itself, etc. ad nauseum. So, my proposal is to add in &untyped syntax, eg def foo: (&untyped) -> void. (This syntax also allows the possibility of naming the blocks—&untyped foo, and might allow for naming block variables themselves, such as: def yield_ten: (&block) { (Integer) -> void } -> void
Contributor guide
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.
Assessment
This issue has not been assessed yet.