Algebraic Data Types for C99

Datatype99 offers safe, intuitive algebraic data types with exhaustive pattern matching and compile-time introspection, all in pure C99. It ensures type-safe coding by catching errors like improper typing and non-exhaustive pattern matching at compile-time. Datatype99 is portable, requiring only a standard-conforming C99 compiler without any specific libraries or functionality. It boasts formal code generation semantics, guaranteeing consistent data layouts. Used in real-time streaming software for IP cameras, Datatype99 is battle-tested and proven. The library simplifies coding with syntax sugar over tagged unions, ensuring safety and conciseness. The library also supports pattern matching, providing variables for bindings and compile-time safety. With Datatype99, constructing variants and manipulating types becomes straightforward due to its inline static functions called value constructors. The library also supports introspection of types at compile-time for advanced users. Through a well-defined syntax and semantics for macros, Datatype99 enables the creation of Foreign Function Interfaces (FFIs) in C. The library generates various data structures and functions for each variant, making it easy to work with complex data types. By following guidelines and avoiding pitfalls, users can harness the full power of Datatype99 in their projects. Overall, Datatype99

https://github.com/Hirrolot/datatype99

To top