Website | Source
The C2 project attempts to create a new language, strongly based on C. In a nutshell, the main differences with C are:
- Higher development speed
- Same/better speed of execution
- Better compilation times
- Integrated build system
- Stricter syntax (easier for tooling)
- Great tooling (formatting tool, graphical refactoring tool)
- Easy integration with C libraries
- Should be easy to learn for C programmers
- Should help to avoid common mistakes
As C2 is an evolution of C, it also has explicit non goals:
- higher-level features (like object-orientation, garbage collection, etc.)
- to be a completely new language
Example
Hello world:
module hello_world;
import stdio as io;
fn i32 main(i32 argc, char** argv) {
io.printf("Hello World!\n");
return 0;
}
Tags:
language
llvm
native
Last modified 16 December 2024