What does it do?
Keep existing C11 files as they are while introducing Type-C syntax in the files that need it. Variant types and match can check field access for each case and detect missing cases, while distinct type can prevent mistakes from mixing different IDs or units. typec accepts cc command-line options, converts the code to readable C, and passes it to a C compiler. The project description states that the current examples work, but the rest of the language design has not yet been implemented.
Key features
- Check case-specific field access and missing cases with variant types and match.
- Use if (case ...) to check a case and bind its fields.
- Prevent implicit mixing of IDs or units with distinct type.
- typec converts Type-C to readable C code and passes it to a C compiler.
- Keep existing C11 files unchanged and adopt it file by file.