Since C2 is an evolution of C, this page is here to summarize the changes made and the design philosophy behind it.
TODO this page is in progress
Language changes
-
no Header files
consequence: import statement and modules
-
no forward declarations
philosophy: types the same thing twice, reduces development speed
consequence: requires a multi-pass compiler
-
member access always through dot-operator ' . ' , not sometimes ' -> '
philosophy: remove clutter/reduce change effort
-
Unified type definitions
-
All global variables are initialized by default
-
better external library control
-
removed do..while, since it's not needed without macros
New Features
While C2 introduces some NEW features, these dont break the C philosophy and are mainly Syntax cleanup, syntactic-sugar or remove a C anti-pattern:
-
More tooling integration like dependency and refs file generation