V, also called Vlang, is a simple programming language that compiles to fast native code in seconds. Its goal is to be as easy to read as Python and as fast as C, with almost no boilerplate and a compile time so short you barely notice it. If you have ever waited minutes for a large project to build, V's speed will feel like a relief.
What makes V different? First, it has a tiny syntax — you can learn most of the language in an afternoon. Second, it compiles directly to machine code with no virtual machine and no garbage collector by default. Third, it has built-in tools: a formatter, a test runner, and a package manager are all part of the language itself.
Here is your first V program. Save it as hello.v and run it with v run hello.v:
fn main() {
name := 'Arhan'
println('Hello, $name! Welcome to V.')
numbers := [1, 2, 3, 4, 5]
doubled := numbers.map(it * 2)
println(doubled) // [2, 4, 6, 8, 10]
println(greet('Priya'))
}
fn greet(user string) string {
return 'Hello, $user!'
}
The := declares a variable, $name inserts a value into a string, and numbers.map(it * 2) shows how short V code can be. There is no public static void main, no imports for basic printing, and no semicolons.
Where is V used? It is used for command-line tools, web servers with the built-in vweb module, games, and systems tools. Developers who want C-like speed without C-like complexity reach for V when they need a small, fast binary quickly.
Who should learn V? C developers who want simpler syntax, Go developers who want faster compile times, and beginners who want a compiled language without a steep learning curve. It is a good second systems language after Python or JavaScript.
V's limits are worth knowing. It is still young, so libraries are fewer than in Go or Rust. Some features are still stabilising, and the community is small. Check that the libraries you need exist before committing to V for a large project.
Your first step today: install V, run the program above, and then write a small program that reads a file and prints how many lines it has. In a week you will be surprised how much you can build with so little syntax.
Top comments (0)