sumtype.h
github.com · Open source · Quiet
Single-header C library for sum types
- Developer tools
- Open source
- C
- Day-7 check
- Day-30 check
- header only
- types
- sum types c
- algebraic data types c
- c pattern matching
- tagged union macro
- c99 header library
- Stars
- 75
- Forks
- 3
- Open issues
- 0
- Last commit
- Found
- 2 years ago
GitHub figures as of . They are context, not a ranking.
sumtype.h is a single C header of about 100 lines that adds sum, or algebraic, types to C. It is a mirror of a project hosted on sourcehut, so the GitHub copy follows that original.
Repository description on GitHub: “A mirror of https://git.sr.ht/~grego/sumtypes.h”
What it does
- Single C99 header of about 100 lines with nothing else to install
- Sum types with exhaustive pattern matching through macros
- Type inference when compiled as C2x or with GNU extensions
Good for
- Model tagged data such as trees in plain C
- Pattern match over variant values in C code
Suits: C developers who want sum types without a new compiler.
Worth knowing: The GitHub copy mirrors a project hosted on sourcehut.
What you can try
Read the README on GitHub and install from source.
Links go to third-party sites KipFound does not control. KipFound has not installed, audited or tested this software.
Found vs. released
Kip first saw sumtype.h on , when marosgrego posted it to Show HN. GitHub listed no published releases for grego/sumtype.h when checked , so the project may ship straight from its main branch. The repository was created .
Day-7 and day-30 updates
Day 7 no new release
- No tagged release was published in the first 7 days after it was found (GitHub release dates).
- Show HN discussion at check time: 92 points, 43 comments. API record
Checked , later than day 7 because tracking began after.
Day 30 no new release
- No tagged release was published in the first 30 days after it was found (GitHub release dates).
- Show HN discussion at check time: 92 points, 43 comments. API record
Checked , later than day 30 because tracking began after.
Release timeline every entry links to its source
- Repository created on GitHub: grego/sumtype.h
- Found: marosgrego posted it to Show HN. Show HN
- Day-7 check recorded by Kip (details)
- Day-30 check recorded by Kip (details)
Quick answers
- When was sumtype.h released?
- No dated release record is available. Kip found it on Show HN on 25 May 2024.
- Is sumtype.h open source?
- Its source is public on GitHub at grego/sumtype.h under the WTFPL licence.
- What does sumtype.h run on?
- Library.
- Is sumtype.h free?
- It is open source, so the code is free to read and run; check the licence for terms.
- Is sumtype.h still maintained?
- It has had no commit or release for over a year as of the latest check.
Provenance
| Source | Record | Last checked |
|---|---|---|
| Show HN | listing official API record | |
| GitHub repository | grego/sumtype.h REST API record | |
| GitHub Releases | release list REST API record |
Stable ID hn-40478175. Summary drafted with AI from the source records above and checked against KipFound’s rules before publishing. Dates and release facts come only from those records.
Share
Similar tools
Made this, or spotted a mistake? Ask for a correction or removal. No account or email address needed.