Design Goals
Want To Download C3?
Download C3, available on Mac, Windows and Linux.
Design goals¶
- Procedural language, with a pragmatic ethos to get work done.
- Minimalistic, no feature should be unnecessary or redundant.
- Stay close to C - only change where there is a significant need.
- Learning C3 should be easy for a C programmer.
- Seamless C integration.
- Ergonomic common patterns.
- Data is inert.
- Zero Is Initialization (ZII).*
- Avoid "big ideas".
"Zero Is Initialization" is an idiom where types and code are written so that the zero value is a meaningful, initialized state.*
Features¶
- Full C ABI compatibility
- Module system
- Operator overloading
- Generic modules
- Design by contract
- Zero overhead errors
- Semantic macro system
- First-class SIMD vector types
- Struct subtyping
- Safe array access using slices
- Safe array iteration using foreach
- Easy to use inline assembly
- Cross-platform standard library which includes dynamic containers and strings
- LLVM backend
C3 Background¶
C3 is an evolution of C, a general-purpose language designed for native software development. It preserves the paradigms and syntax of C as far as possible while adding modern features for building everything from systems software to applications.
C3 started as an experimental fork of the C2 language by Bas van den Berg. It has evolved significantly, not just in syntax but also in regard to error handling, macros, generics and strings.