Skip to content
Algebraic data types in C
Python C C++ Makefile
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples
LICENSE
Makefile
README.md
algebraic.h
macro_iter.pyp.h
py_processor.py
test.c

README.md

algebraic-c

Algebraic data types in C

This is my attempt to define a better version of union types in C. Product types in C can be achieved through the use of structs, and for the most part, work fairly well. Union types in C can be achieved through unions, although the bookeeping of which variable corresponds to which type cannot be done programatically.

You can see some example usage in test.c

You can’t perform that action at this time.