Toolsslug: type-c

Type-C

A C11 superset language offering variant types, pattern matching, generics and errors-as-values, transpiled to C by typec.

Curated Intelligence

1 items · Page 1/1
Hacker News AIT2·Tools
58 pts
Type-C Adds Variants, Generics and Pattern Matching to C11

Type-C is a superset of C11 that adds the types C lacks: variants checked by match, distinct types for ids and units, generic types, and errors-as-values with try and defer. Its compiler typec takes the same command line as cc, lowers Type-C into readable C, and hands it to the C compiler, so existing C11 files are already Type-C files and adoption can proceed one file at a time. The project is early: every example on the page works today, but the rest of the language is designed yet unbuilt.