Provide a newtype wrapper?
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 360
- Forks
- 78
- PR merge metrics
- No merged PRs in 30d
Description
The most common case for deep recursion is when handling deeply nested recursive types, where SomeType has a Box<SomeType> (or some other container) internally that can be nested really deeply, and then any standard operations that need to walk entire type, fail.
Suggestion: would it be worth providing a Stacker<T> newtype that automatically handles Deref, DerefMut, PartialEq, PartialOrd, Hash, Debug and so on and all other standard traits, but automatically checks and grows the stack before recursing?
It seems that such type would magically handle most common cases without user having to write any stack-growing code.
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
No file, test, or entry point is named. Start by reviewing the existing stack-growing API and how deeply nested recursive types perform standard operations. Done would require a decided, implementable scope for a Stacker wrapper and agreement on the traits and recursion behavior it should support.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100