Since C2 is an evolution of C, this page is here to summarize the changes made and the design philosophy behind it.

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

  • Standardized attribute syntax

  • better external library control

  • Improved operator precedence

  • No auto-fallthrough in switch cases

  • no arrays as function arguments

  • removed do .. while, since it's not needed without macros and error prone

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: