Just browsed the doc to get the answers to two burning questions, which I will dump here in case it saves some time to others:
- uses LLVM (so: as portable as LLVM)
- sadly, does not support tagged enums
Apart from that it adds a few very desirable things, such as introspection and macros.IMHO the downsides of tagged unions (e.g. what Rust confusingly calls "enums") are big enough that they should only be used rarely if at all in a systems programming language since they're shoehoerning a dynamic type system concept back into an otherwise statically typed language.
A tagged union always needs at least as much memory as the biggest type, but even worse, they nudge the programmer towards 'any-types', which basically moves the type checking from compile-time to run-time, but then why use a statically typed language at all?
And even if they are useful in some rare situations, are the advantages big enough to justify wasting 'syntax surface' instead of rolling your own tagged unions when needed?
There is https://github.com/c3lang/c3c/issues/829