Wrap all C stlib functions that return a pointer in a Result type
Open
Nobody has claimed this yet.
core-libs
nice-to-have
- Dominant language
- Haskell
- Stars
- 6k
- Forks
- 187
- Avg merge
- 8d 22h
- Merged PRs (30d)
- 4
Description
Many C library functions return a null pointer on error, i.e. `malloc` and `fopen`, etc. To make these more safe, their return values should be wrapped in a `Result` type.
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.
Research direction
Start by inventorying the C standard-library functions that return pointers, using malloc and fopen as examples, and identify how Carp represents Result values. Determine the complete wrapper scope and expected error behavior before changing code. Done means every applicable pointer-returning C stdlib function returns a Result rather than exposing a nullable pointer.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100