Introduction to V
1.1 What is V?
A statically typed, compiled general-purpose language created by Alexander Medvednikov (public release 2019).
Goals: simplicity, safety, speed, and maintainability. Its syntax is similar to Go, with influences from Oberon, Rust, Swift, and Kotlin.
Compiles to human-readable C (the primary backend), then to native code. It also has JavaScript, WebAssembly, and an experimental native (machine code) backend.
The compiler is self-hosted (written in V) and very fast. V claims ~1 million lines/second with TCC, and the compiler builds itself in about a second.
1.2 Key Features
Small language. "One way to do things." You can learn it in a weekend.
Sub-second builds with the TCC backend C-level runtime speed, minimal allocations
No null (by default), no undefined values, no globals (by default), immutable by default, bounds checking, no variable shadowing, Option/Result types, sum types, generics
GC by default (Boehm), with autofree (experimental), -gc none (manual), and arena -prealloc options
Call C directly without wrappers, plus C→V translation (c2v)
Formatter (v fmt), test runner, doc generator, package manager, profiler, hot reload
ORM, web framework (veb), JSON, HTTP, graphics (gg), UI Build for Windows/Linux/macOS from one machine
No runtime dependencies (a hello world is ~100 KB)
1.3 Safety Guarantees (by Design)
No null references (use ?T options). No uninitialized variables (zero values everywhere).
Immutable variables, structs, and function arguments by default. mut is explicit.
No global variables (unless explicitly enabled). No variable shadowing.
Bounds checking on arrays. Pure functions by default (in spirit: arguments are immutable).
No undefined behavior is a goal, enforced in many cases with checks.
Error handling can't be silently ignored: results must be handled.
1.4 Use Cases
CLI tools, web services and APIs, system utilities, games and graphics, GUI apps, compilers and interpreters, embedded and scripting (.vsh shell scripts), translating C codebases (e.g., DOOM was translated with c2v).
1.5 Project Status
V is pre-1.0 and beta. The core language is fairly stable, but expect breaking changes, compiler bugs, and evolving stdlib APIs.
Notable projects: the V compiler itself, Vinix (an OS), gitly (a Git hosting service), vab (Android builder), v-analyzer (language server), Ved (editor).