compare · C++
fastC vs C++
C++ is the incumbent high-performance systems language with decades of ecosystem. fastC is the smaller, memory-safe, capability-typed alternative built for code an agent writes and a human must audit.
C++ is the language fastC is most often measured against on performance, because both target native systems work without a GC. The difference is surface area and safety posture: C++ is enormous, unbelievably capable, and unsafe by default — every UB site is a foothold, and an agent writing C++ produces those at volume. fastC is a deliberately small language that trades C++'s template metaprogramming and ingest-existing-C++ power for capability-typed I/O, mandatory contracts, and a compiler that refuses more than it silently miscompiles.
Row by row
| Dimension | fastC | C++ | Note |
|---|---|---|---|
| Memory safety by default | Yes — runtime traps + contracts | No — UB on use-after-free, OOB, data races | fastC's structural wedge over C++. |
| Capability-typed I/O | Yes — caps in signatures | No — any function can open() / socket() / fork() | fastC records what a function cannot do. |
| Contracts on public APIs | Yes — @requires / @ensures, three-tier discharge | Contracts arrive in C++26; historically assert only | fastC ships them enforced today. |
| No executable build scripts | Yes — declarative manifest only | No — CMake / build systems are arbitrary code | Same supply-chain critique as build.rs / build.zig. |
| Compile speed | Fast — emits C; ~30% faster than Rust release | Slow — template instantiation + header parsing | fastC wins; C++ builds are famously heavy. |
| Stripped 'hello' binary | 53 KB | ~40–130 KB depending on iostream / libstdc++ linkage | Same class; fastC adds a small trap shim. |
| Metaprogramming | No — surface kept small | Yes — templates, concepts, constexpr | C++ wins on expressiveness; trade-off for surface area. |
| Ingesting existing C/C++ | No — emits C, does not parse it | Yes — native | C++ wins; different threat model. |
| Supply chain / provenance | sha256 + cosign + SLSA L3, vendored | vcpkg / Conan; no enforced provenance | fastC structural. |
| Ecosystem + maturity | 2026 v1.0; 11 curated packages | 40+ years, vast ecosystem, every platform | C++ wins decisively on breadth and maturity. |
| Agent error modes | Refuses or traps; fewer silent-wrong outputs | Compiles UB silently; hardest language for agents to get right | fastC wins for agent-generated code safety. |
| Toolchain / target breadth | One host, 8 cross presets via zig cc | Every platform on Earth has a C++ compiler | C++ wins on reach. |
Where fastC wins
fastC wins where you are starting fresh and want memory safety, capability-typed I/O, contracts, fast builds, and a supply chain with provenance — especially when an agent writes the code and a human certifies it. The whole point is that fastC refuses the categories of mistake C++ compiles without complaint.
Where C++ wins
C++ wins on ecosystem, maturity, template metaprogramming, the ability to ingest existing C and C++, platform reach, and raw ceiling of control. For extending a large existing C++ codebase, for template-heavy generic libraries, or for platforms fastC has no target for, C++ remains the right tool.
The honest framing
C++ is more powerful and more dangerous. fastC is not trying to out-express C++ — it deliberately gives up templates and C++ ingestion. It is for new native code where the dominant risk is a stochastic author producing undefined behavior, and where you would rather the compiler refuse than miscompile.