Introduction to V++

V++ is a statically typed programming language with readable syntax, a fast interpreter for development, and native compilation to standalone executables via LLVM.

Write it simply. Compile it natively. Grow into control when you need it.

What V++ is

V++ targets developers who want Python style readability without giving up compile time safety or native performance. You start with vpp run during learning and prototyping, then ship the same source with vpp build when you need a .exe with no runtime dependency.

The toolchain includes a type checker, formatter, package manager, test runner, VS Code language server, and twenty guided projects from beginner to advanced.

How V++ compares

Python Rust C/C++ V++
Syntax Very readable Steeper Verbose Readable, minimal
Typing Dynamic (optional hints) Static, strict Static Static + inference
First run Interpreter Compile Compile Interpreter (vpp run)
Native output No (without extra tools) Yes Yes Yes (vpp build)
Learning curve Low High Medium high Low → medium
Ecosystem Massive Large Huge Growing (v1.0+)

vs Python: V++ catches type errors before run, produces native binaries, and keeps similar control flow and function syntax. You trade PyPI's scale for a smaller, focused stdlib and a compiler that fits in one repo.

vs Rust: V++ avoids ownership/borrowing complexity upfront. Memory is ARC managed in native builds; you get structs, enums, match, generics, and traits without the full Rust learning cliff.

vs C/C++: V++ removes manual memory management and header boilerplate. You still get native code and predictable performance for the supported subset.

Why use V++ now

  • One language, two modes interpret while learning, compile when shipping.
  • Errors before run static types and exhaustiveness checking on match.
  • Real toolchain CLI, LSP, VS Code extension, packages, tests, not a toy parser.
  • Open source MIT licensed, compiler and docs in one repository.
  • Honest scope v1.0 SPEC is frozen; Windows is the primary native platform; Unix bundles improving.

How to learn V++

1. Install the Windows installer or build from source.

2. Write your first program types, fn main, run/check/build.

3. Scaffold a project with vpp new and run tests.

4. Work through the 20 projects in order each builds on the last.

5. Read the language overview and FAQ.

6. Use Documentation as reference while coding.

Expect 1 2 weeks to feel comfortable with syntax and types if you know Python or JavaScript. Expect another few weeks for structs, enums, generics, traits, and native builds.

Common difficulties

Challenge What helps
Types feel strict Start with vpp check and read error messages; locals are inferred.
Native build fails Install LLVM 22 + clang; run vpp doctor.
Small ecosystem Stdlib covers io, fs, json, process; contribute or vendor code.
Language still evolving Pin a release; watch CHANGELOG before upgrading.
Windows first Primary CI and installers are Windows; other platforms are best effort.

When V++ is not the right choice

  • You need a mature package ecosystem (use Python, Node, or Rust).
  • You need mobile, WebAssembly, or embedded targets today (not primary focus).
  • You need Linux/macOS prebuilt native bundles today (Windows installer is fully supported).

Next steps

Install V++

1. Download vpp-1.0.4-setup.exe from GitHub Releases.

2. Run the installer. If Windows SmartScreen appears, choose More info → Run anyway.

3. Open a new terminal:

hello.vpp
vpp run examples\hello.vpp
vpp check examples\hello.vpp
vpp --version
# Verify your install
vpp doctor

If vpp is not found, add the install folder to PATH:

terminal
$dir = "$env:LOCALAPPDATA\Programs\vpp"
[Environment]::SetEnvironmentVariable("Path", $env:Path + ";$dir;$dir\llvm\bin", "User")
# Restart terminal after updating PATH
vpp --version
vpp doctor

Restart the terminal.

CMake

The installer includes cmake/FindVpp.cmake and cmake/Vpp.cmake under your install folder (same directory as vpp.exe). See CMake integration.

VS Code extension

1. Extensions → search V++ Language

2. Publisher must be vpp lang (version 1.2.1)

3. Marketplace link

See VS Code setup.

Portable zip (advanced)

Download vpp-v1.0.4-windows-x64.zip, extract, run GO.bat or add the folder to PATH manually.

Linux / macOS

Interpreter and LSP work from source today. Prebuilt native bundles for Unix are improving see GitHub Releases when available, or build from source.

Build from source

See Building from source.

Requirements

Task Needs
vpp run, check, test, debug, watch Installer (Windows) or built vpp
vpp build (native .exe) Bundled clang in installer, or LLVM 22
Hack on compiler Rust + LLVM 22

V++ language overview

V++ combines readable syntax with static typing and optional native compilation.

Design goals

  • Readable minimal punctuation, familiar control flow
  • Typed catch errors before run; infer locals, explicit function signatures
  • Fast iteration vpp run interpreter for development
  • Native when needed vpp build produces standalone .exe files

Quick syntax map

Topic Doc
Types & let types-and-inference.md
Functions functions.md
if / loops / match control-flow.md
Structs & enums structs-and-enums.md
Option / Result option-result-match.md
Generics generics.md
Traits traits.md
mut mut-and-immutability.md
Modules modules.md

Formal spec: SPEC.md.

FAQ

What is V++?

A statically typed language with readable syntax, an interpreter for development, and native compilation to .exe via LLVM. Open source (MIT). v1.0.4 (compiler + extension).

How is V++ different from Python?
Python V++
Typing Dynamic (optional hints) Static + inference
Run Interpreter default Interpreter + native .exe
Errors Mostly at runtime Types and exhaustiveness at compile time
Ecosystem Huge (PyPI) Small stdlib + growing registry
Best for Scripts, ML, web backends Learning, CLI tools, typed native programs

Python is better when you need libraries and speed of prototyping across domains. V++ is better when you want types and a native binary without switching languages later.

How is V++ different from Rust?

Rust enforces ownership and borrowing at compile time for maximum safety and performance. V++ uses ARC for heap values in native mode and skips the borrow checker easier to learn, less control over allocation patterns.

Choose Rust for systems programming at scale. Choose V++ to learn typed languages or ship small native tools with Python like syntax.

How is V++ different from Go or TypeScript?

Go is statically typed with a large ecosystem and goroutines. TypeScript adds types to JavaScript but still runs on Node/V8. V++ is a standalone language with its own interpreter and LLVM backend not a host VM language.

How do I learn V++?

1. Read Introduction.

2. Install and write the first program.

3. Complete the 20 projects.

4. Reference language docs and guides.

If you know Python or JavaScript, expect a few days for syntax; a few weeks for types, structs, and native builds.

What are the main difficulties?
  • Strict types function signatures and match exhaustiveness are enforced.
  • Native builds require LLVM 22 + clang; Windows has full installer support today.
  • Young ecosystem fewer third party packages than Python or Rust.
  • Unix bundles Linux/macOS native tarballs are still maturing on CI.
Why would I choose V++?
  • Readable syntax with real static typing.
  • Same source for interpret (vpp run), debug (F5), and native ship (vpp build).
  • Integrated toolchain: fmt, test, debug, watch, packages, LSP, VS Code extension.
  • Full compiler source available to read and contribute to.
Is V++ ready for production?

v1.0 SPEC frozen, Parity Promise, debugger, Test Explorer. Best on Windows for native builds. Suitable for learning, personal tools, and small native programs. Not a drop in replacement for Python or Rust at huge scale. See roadmap.

Where do I download?

GitHub Releases vpp-1.0.4-setup.exe for Windows (portable zip on the same page).

Which VS Code extension is official?

V++ Language publisher vpp-lang (vpp-lang.vplusplus). Extension 1.2.1 (pairs with compiler v1.0.4).

Can I contribute?

Yes. The project is open source (MIT). Open an issue or PR see CONTRIBUTING.md. Docs, tests, stdlib, examples, and extension polish are great starting points. Language design changes should be discussed in an issue first.

Does V++ collect data?

No telemetry. Static docs site, no analytics. See PRIVACY.md.

How do I report bugs?

First program

Create a file named hello.vpp:

main.vpp
fn main() -> int {
    print("v++ program started")
    return 0
}
// Run: vpp run main.vpp

Every executable entry point is fn main() -> int. The return value is the process exit code (0 = success).

Run (interpreter)

hello.vpp
vpp run hello.vpp
vpp check hello.vpp
vpp --version
# Verify your install
vpp doctor

Uses the built in interpreter no compile step. Best for learning and quick iteration.

Type check only

terminal
vpp check hello.vpp
vpp run hello.vpp
vpp fmt hello.vpp
vpp test
vpp build src/main.vpp -o app.exe

Reports type errors without running. Use this in CI or before committing.

Compile to native

terminal
vpp build hello.vpp -o hello.exe
.\hello.exe
./app.exe
vpp run app.vpp
vpp test

Requires LLVM and clang on your PATH. Produces a standalone .exe with no V++ runtime dependency.

Commands summary

Command Purpose
vpp run Execute via interpreter
vpp check Static analysis only
vpp build Native executable via LLVM

Next: Your first project.

Your first V++ project

Scaffold

terminal
vpp new myapp --path myapp
cd myapp
vpp run
vpp test
vpp build src/main.vpp -o myapp.exe

Creates:

text
myapp/
  vpp.toml
  src/main.vpp
  tests/smoke.vpp
# ...

Run

terminal
vpp run
vpp --version
vpp doctor
vpp run examples/hello.vpp
vpp check examples/hello.vpp

Runs the entry in vpp.toml (default src/main.vpp).

Test

terminal
vpp test
vpp run
vpp check src/main.vpp
vpp --version
# Inline test blocks supported

Runs test blocks in tests/ and inline tests.

Add a dependency

terminal
vpp add hello-lib --version 0.1.0
vpp update
vpp install
vpp run
vpp test

See Package manager.

VS Code setup for V++

Install

1. Install the compiler (install guide).

2. Install extension V++ Language (publisher: vpp lang).

Run code

1. Open a folder with .vpp files.

2. Open a file bottom right should say V++.

3. Press F5 or Ctrl+Shift+R to run the active file.

Language server (IntelliSense)

Build vppls once (or use a release that includes it):

terminal
cargo build --release --features lsp --bin vppls
vpp --version
vpp doctor
vpp run examples/hello.vpp
vpp check examples/hello.vpp

Settings (File → Preferences → Settings, search vpp):

Setting Purpose
vpp.compilerPath Path to vpp.exe
vpp.languageServerPath Path to vppls
vpp.enableLanguageServer Red squiggles, completion, go to definition

Commands

Command Shortcut
V++: Run File F5, Ctrl+Shift+R
V++: Check File Command Palette
V++: Run Tests Command Palette

See also: Language server, Troubleshooting.