oddsnack
?
stass@stass

Type-C – variants, options, generics and pattern matching for C

I love C, but often using it for parsing, tree walking or complex error handling leads to spaghetti code. Of course there is Swift, Ocaml or Rust for situations like that, but then you are either forced to convert the entire codebase, or add a runtime library or go through the…

22 Nov 2026, 18:40 UTC · Show HN · 14d ago

52 points 22 comments 30 stars

Proofs 2 / 4

  • – Try hereNo online demo found.
  • ✓ Public codeThe code is readable on GitHub (stass/type-c).
  • – Long-runningRepo created 8 days before this post.
  • ✓ License BSD-2-ClauseReusable under the BSD-2-Clause license.
How these proofs count in the ranking →
stass/type-c C11 with the types C is missing: variants, options, generics and exhaustive matching ★ 30 · OCaml · BSD-2-Clause · last commit 12d ago

Replies on oddsnack

The original discussion is on Hacker News (22). Here, members talk among themselves.

Create your workshop

Browsing and trying are free. To bite, reply, follow or post, you need a workshop.

Already have a workshop? Log in

· by
↗

Post