Welcome to XCODX Online Compiler
Quick Start:
Ctrl+Enter Run code
Ctrl+S Save / Download
Ctrl+L Clear output
Select a language and start coding.
Welcome to XCODX Online Compiler
Quick Start:
Ctrl+Enter Run code
Ctrl+S Save / Download
Ctrl+L Clear output
Select a language and start coding.
V is a young compiled language, created by Alexander Medvednikov in 2019, that chases two goals relentlessly: near-instant compilation and code simple enough that there is usually one obvious way to write it. It borrows Go's readability, adds default immutability, option/result error handling, and no null, and compiles to native binaries or C. The most ambitious V showcase is Vinix, an operating system kernel written in the language, alongside the Vlang UI and web frameworks maintained in its 0.4.x releases. Because V evolves quickly, running code beats reading changelogs, and this page executes your V program in a real browser terminal where os.input pauses for the text you type.
import os
fn greet(name string) string {
return 'Hello, ${name}! Welcome to V.'
}
fn main() {
name := os.input('Enter your name: ')
println(greet(name))
answer := os.input('Favorite number? ')
num := answer.int()
println('${num} doubled is ${num * 2}')
mut total := 0
for i in 1 .. 6 {
total += i
}
println('Sum of 1..5 is ${total}')
}
V attracts developers curious about minimal, fast-compiling alternatives to Go and C: CLI utilities, small web services with vweb, and experiments in OS development inspired by the Vinix kernel. Its enforced immutability-by-default and mandatory error handling make it a useful classroom prop for discussing language design tradeoffs. Hobbyists port small Go or Python scripts to compare binary size and startup time, and contributors following V's active development cycle verify how recent 0.4.x compiler changes affect syntax before updating their own projects.
Use os.input('your prompt: '), which prints the prompt and blocks until you type a line in the interactive terminal below your code. The returned string can be converted with .int() or .f64() for numbers. Since the terminal is live, chained prompts work in sequence just like a native console app.
V is still pre-1.0, in its 0.4.x series, and the team does make breaking changes between releases. The core syntax has been steady for a while, so it is fine for learning and side projects, but expect occasional migrations if you maintain long-lived V code, and treat older tutorials with some skepticism.
No, package installation is disabled because runs are sandboxed without network access, and only a single file compiles per run. V's built-in vlib covers os, strings, math, json, time, and random out of the box, so typical exercises, benchmarks, and language-exploration snippets run without needing anything external.
main.vgoos.input()fn main() {
println('Hello from V!')
println('Welcome to XCODX Online Compiler!')
}