C2 is an evolution of C: this page summarizes the changes made and the design philosophy behind it.
Language changes
-
no Header files
consequence: import statement and modules
-
no forward declarations
philosophy: define types in a single place, better 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 and error prone
New Features
While C2 introduces some NEW features, these do not break the C philosophy and are mainly Syntax cleanup, syntactic-sugar or remove some C anti-patterns:
-
More tooling integration like dependency and refs file generation