HeadlinesBriefing favicon HeadlinesBriefing.com

CobaltC – The Successor to C?

Hacker News •
×

Cobalt C is a statically typed systems programming language offering explicit ownership, deterministic destruction, compiler-checked borrowing, inferred lifetimes, explicit nullability, bounds-safe operations, structured error handling, safe concurrency, and explicit unsafe operations. Designed for software requiring predictable resource management, strong memory safety, native execution, and controlled interaction with low-level facilities, Cobalt C eliminates the need for tracing garbage collection.

The language specification uses normative terminology like MUST and SHOULD, distinguishing between implementation-defined and undefined behavior. Safe operations must not introduce undefined behavior through ordinary use.

Cobalt C programs consist of Unicode source modules with case-sensitive identifiers, supporting line and block comments. Reserved keywords include as, break, case, const, and struct. The language defines primitive types (i32, f64, bool), compound types (structs, enums, tuples), managed references (T*), and raw pointers (raw T*).