ArticleslgStudy

computer science

V (programming language)

V (programming language) is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand V (programming language) rather than just read about it. In short: 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.

V (programming language) — main illustration
V (programming language) — illustration

Key takeaways

  • V (programming language) belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect V (programming language) to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of V (programming language) from memory before moving on to harder problems.

Reference excerpt

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. The goals of V include ease of use, readability, and maintainability.

History The new language was created as a result of frustration with existing languages being used for personal projects. It was originally intended for personal use, but after being mentioned publicly and increasing interest, it was decided to make it public. V was initially created to develop a desktop messaging client named Volt. On public release, the compiler was written in V, and could compile itself. 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. V is developed, maintained, and released through GitHub by developers and contributors internationally. In 2025, V started being ranked on the TIOBE index.

Features

Safety V has policies to facilitate memory-safety, speed, and secure code, including various default features for greater program safety. 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. The language can be compiled to human-readable C, and in executing and compiling, is considered as fast.

Memory management V supports four memory management options:

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

Source code translators V supports a source-to-source compiler (transpiler) and can translate C code into V. Working translators are also being developed for Go, JavaScript, and WebAssembly.

Syntax Representative examples of V syntax include:

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

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 =:

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

Structs Struct example:

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:

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:

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.

See also

Comparison of programming languages History of programming languages List of programming languages List of programming languages by type

References

Bibliography

Further reading

External links Official website Vlang on GitHub Documentation

Illustrations

V (programming language) illustration
V (programming language): Veasel is the official mascot of the V programming language[19]
Veasel is the official mascot of the V programming language[19]

Worked examples

Example 1 — a first encounter with V (programming language)

Start with the simplest possible case. Write down what V (programming language) claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to V (programming language) before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about V (programming language) ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of V (programming language)

In research
V (programming language) appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses V (programming language) in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
V (programming language) is common in secondary-school and first-year university syllabi. It links to neighbouring topics 2019 software, C programming language family, Concurrent programming languages, so understanding it makes those chapters shorter.
In everyday life
Look for V (programming language) outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “V (programming language)” →

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study V (programming language) in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what V (programming language) means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain V (programming language) out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is V (programming language) in simple terms?

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.

Why does V (programming language) matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study V (programming language)?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on V (programming language).

Tags

  • 2019 software
  • C programming language family
  • Concurrent programming languages
  • Cross-platform free software
  • Cross-platform software
  • Free and open source compilers
  • Functional languages
  • Multi-paradigm programming languages
  • Procedural programming languages
  • Programming languages
  • Programming languages created in 2019
  • Software using the MIT license

Keep exploring