Article · Wikipedia archive · Last revised Jun 8, 2026

V (programming language)

V, also known as vlang, is an in-development statically typed, compiled programming language created by Alexander Medvednikov in early 2019. It was inspired by Go, and other programming languages including Oberon, Swift, and Rust. It is free and open-source software released under the MIT License, and currently in beta.

Last revised
Jun 8, 2026
Read time
≈ 6 min
Length
1,446 w
Citations
68
Source
V
A capitalized letter V colored blue
The official V logo
ParadigmsMulti-paradigm: functional, imperative, structured, concurrent
Designed byAlexander Medvednikov1
First appeared20 June 2019 (2019-06-20)2
Stable release
0.5.13 Edit this on Wikidata / March 9, 2026 (March 9, 2026)
Typing disciplinestatic, strong, inferred
Memory managementoptional (automatic or manual)
Implementation languageV
OSWindows; Unix-like: Linux, macOS, FreeBSD, OpenBSD, NetBSD, DragonflyBSD, Solaris
LicenseMIT
Filename extensions.v, .vsh
Websitevlang.io
Influenced by
Go, Kotlin, Oberon, Python, Rust, Swift

V, also known as vlang, is an in-development statically typed, compiled programming language created by Alexander Medvednikov in early 2019.4 It was inspired by Go, and other programming languages including Oberon, Swift, and Rust.567 It is free and open-source software released under the MIT License, and currently in beta.8

The goals of V include ease of use, readability, and maintainability.91011

History

The new language was created as a result of frustration with existing languages being used for personal projects.12 It was originally intended for personal use, 12 but after being mentioned publicly and increasing interest, it was decided to make it public.13 V was initially created to develop a desktop messaging client named Volt.6 On public release, the compiler was written in V, and could compile itself.412 Key design goals in creating V were being easy to learn and use, higher readability, fast compiling, increased safety, efficient development, cross-platform usability, improved C interoperability, better error handling, modern features, and more maintainable software.14151016

V is developed, maintained, and released through GitHub176 by developers and contributors internationally.4 In 2025, V started being ranked on the TIOBE index.18

Veasel is the official mascot of the V programming language19 source ↗

Features

Safety

V has policies to facilitate memory-safety, speed, and secure code,14206 including various default features for greater program safety.71412 It employs bounds checking, to guard against out of bounds use of variables. Option/result types are used, where the option data type (?) can be represented by none (among possible choices) and the result type (!) can handle any returned errors. To ensure greater safety, error checking is mandatory. By default, the following are immutable: variables, structs, and function arguments. This includes string values are immutable, so elements cannot be mutated. Other protections, which are the default for the language, are: no use of undefined values, variable shadowing, null pointers (unless marked as unsafe), or global variables (unless enabled via flag).

Performance

V uses value types and string buffers to reduce memory allocations.212214 The language can be compiled to human-readable C,74 and in executing and compiling, is considered as fast.141512

Memory management

V supports four memory management options:236124

  1. A garbage collector. This is the default.
  2. Manual memory management via disabling the garbage collector.
  3. Autofree, which is experimental, for invoking the necessary calls to automatically release objects while compiling.
  4. Arena allocation.

Source code translators

V supports a source-to-source compiler (transpiler) and can translate C code into V.152410

Working translators are also being developed for Go, JavaScript, and WebAssembly.25264

Syntax

Representative examples of V syntax include:

Hello world

The "Hello, World!" program in V:1427

fn main() {
	println("Hello, World!")
}

Variables

Variables are immutable by default and are defined using := and a value. Use the mut reserved word (keyword) to make them mutable. Mutable variables can be assigned to using =:2827

x := 1
mut y := 2
y = 3

Redeclaring a variable, whether in an inner scope or in the same scope, is not allowed:2827

x := 1
{
    x := 3 // error: redefinition of x
}
x := 2 // error: redefinition of x

Structs

Struct example:9727

struct Foo {
    number int
	name string
    score f32
}

// Struct fields can be initialized by name
var1 := Foo {
    number: 21
    name: "baz"
    score: 2.5
}

// or by position
var2 := Foo{50, "taz", 3.14}

Heap structs

By default, structs are allocated via stack-based memory allocation (on the stack). When structs are referenced by using the prefix & or have the [heap] attribute, they are allocated via heap-based memory allocation (on the heap) instead:427

struct Foo {
    number int
}

@[heap]
struct Baz {
    number f32
}

// Structs that are referenced are heap allocated
var1 := &Foo{2}

// Baz is always heap allocated because of its [heap] attribute
var2 := Baz{4.5}

Methods

Methods in V are functions defined with a receiver argument. The receiver appears in its own argument list between the fn keyword and the method name. Methods must be in the same module as the receiver type.

The enrolled_status method (below) has a receiver of type Client named x. The convention is not to use receiver names like self or this, but preferably a short name. For example:91027

struct Client {
    enrolled bool
}

fn (x Client) enrolled_status() bool {
    return x.enrolled
}

println(Client{enrolled: true}.enrolled_status())  // true
println(Client{enrolled: false}.enrolled_status()) // false

Error handling

Result types may represent an error returned from a function. Result types are declared by prepending !: !Type

Optional types may represent none. Option types prepend ? to the type name: ?Type.972327

fn something(t string) !string {
	if t == "foo" { return "foo" }
	return error("invalid")
}

x := something("foo") or { "default" } // x will be "foo"
y := something("baz") or { "default" } // y will be "default"
z := something("baz") or { panic("{err}") } // z will exit with an error

println(x)
println(y)
See also

See also

References

References

  1. "Creator of V". GitHub.
  2. "First public release". GitHub. 20 June 2019.
  3. "Release 0.5 (English)". Retrieved 20 March 2026.
  4. Rao 2021.
  5. Lewkowicz 2019.
  6. James 2019.
  7. Umoren 2021.
  8. "The V Programming Language". vlang.io. Retrieved 4 November 2023.
  9. Knott 2019.
  10. Nasufi, Erdet. "An introduction to V - the vlang". Debian Conference (DebConf). Retrieved 24 July 2022.
  11. Sharma 2024.
  12. Chakraborty & Haldar 2023.
  13. "A small presentation of V's features at IBM". YouTube. Retrieved 6 March 2023.
  14. Galuh, Rosa (8 August 2022). "A Brief Introduction to the V Language". MakeUseOf (MUO). Valnet. Retrieved 8 August 2022.
  15. Choudhury, Ambika (9 February 2022). "Meet V, The New Statically Typed Programming Language Inspired By Go & Rust". Analytics India Magazine (AIM). Retrieved 7 July 2024.
  16. "V language: simple like Go, small binary like Rust". TechRacho. Retrieved 3 March 2021.
  17. "GitHub Programming Languages (repository details)".
  18. "TIOBE Index". tiobe. TIOBE. Archived from the original on 11 April 2025. Retrieved 11 April 2025.
  19. "V's official mascot". GitHub. Retrieved 8 November 2023.
  20. Abbas, Hazem (5 August 2024). "Introduction to V Language and Desktop App Development". medevel. Retrieved 3 January 2025.
  21. Rao 2021, p. 7.
  22. "The V programming language is now open source". Packt Hub. Packt Publishing. 24 June 2019. Retrieved 24 June 2019.
  23. Tsoukalos 2022.
  24. Schlothauer n.d.
  25. "Convert Go to V with go2v". Zenn (in Japanese). 26 January 2023. Retrieved 26 January 2023.
  26. "The V WebAssembly Compiler Backend". l-m. 26 February 2023. Archived from the original on 8 July 2024.
  27. "V Documentation". docs.vlang.io. Retrieved 25 August 2025.  This article incorporates text from this free content work. Licensed under The MIT License (license statement/permission).
  28. Rao 2021, pp. 28–40.
Bibliography

Bibliography

Further reading

Further reading

  • The V Programming Language basic (in Japanese). Independent Laboratory. 20 June 2020. ASIN B08BKJDRFR.
  • Lyons, Dakota "Kai" (13 April 2022). Beginning with V Programming. Independently Published. ISBN 979-8801499963.
  • Sanders, Rafael (18 September 2025). V Language for Beginners: How to Code with V for Fast, Simple, and Maintainable Software. Lincoln Publishers. ISBN 979-8263861681.
  • Sanders, Rafael (18 September 2025). V Language Intermediate Guide: How to Build Reliable Software with V’s Simple but Powerful Features. Lincoln Publishers. ISBN 979-8263865429.
  • Trex, Nova (24 December 2024). V Programming: Building Robust and Efficient Software Systems. Wang Press. ISBN 979-8304813778.
  • Vinicius Silva; Heitor Leite; Fernando Pereira (19 December 2025). "Multi-Language Benchmark Generation via L-Systems". arXiv:2512.17616v1 [cs.SE].
External links