Map

C3

Wiki entitylanguagesystems-programmingblog ↳ show in map Markdown
title
C3
type
entity
summary
Christoffer Lerno's C-tradition systems language; opinionated successor that's rethinking C's defaults from scratch
tags
language, systems-programming, blog
created
2026-05-03
updated
2026-05-03

C3 is a systems language in the C tradition, designed and led by Christoffer Lerno. Self-described as a "C alternative" rather than a C++/Rust competitor β€” keeps C's manual memory model and ABI compatibility, but makes opinionated changes to defaults that C's standardization process never could. Compiles via LLVM, links with C, can include C headers directly.

What's distinctive

The reason C3 ends up in this wiki isn't the syntax β€” it's the willingness to revisit C's defaults publicly when they don't hold up. The "unsigned sizes was a five year mistake" post is an example of the language's design conversations being conducted in writing, with admission of error.

Specific design decisions worth knowing:

  • Modules and slices baked in, no preprocessor in the C sense.
  • Macros are a separate hygienic system (@ prefix), not text substitution.
  • Optionals and errors unified β€” return values can carry "fault" types, the ? and ! operators handle the propagation.
  • Defer, like Go and Zig.
  • Contracts β€” function-level pre/postcondition annotations.
  • Compile-time evaluation via $ prefix β€” comptime in zig terms, but separated lexically from runtime code.

The signed-sizes change

After 5 years on unsigned-default sizes, C3 0.8.0 (2026) flipped the default. The post-mortem (unsigned-sizes-c3-mistake) argues the original convention β€” inherited from C's size_t β€” is the root cause of the well-known unsigned bug class, and that ergonomic patches don't reach it. Java and Go are cited as the languages that got this right.

The signed-size type was renamed isz β†’ sz, with usz as the explicit-unsigned counterpart. Implicit signed↔unsigned conversion and mixed comparisons were dropped.

Blog

The C3 blog at c3-lang.org/blog is Lerno's writing surface for design rationale, retrospectives, and release notes. Unlike most language blogs, it's willing to publish "this default was wrong" posts.

Ingested articles

See also

  • zig β€” the other "let's redo C" project; differs on unsigned sizes (Zig kept them) and on metaprogramming model
  • signed-vs-unsigned-sizes β€” the concept this language is currently the canonical worked example of
  • type-systems-vocabulary β€” adjacent debate space about how language designers talk about types

External: c3-lang.org, github.com/c3lang/c3c

Sub-pages