User:SWinxy/V (programming language)
V (programming Language)
Designed by | Alex Medvednikov |
---|---|
Developer | Alex Medvednikov and Community |
First appeared | 2019 (Beta) |
OS | Cross-platform |
License | MIT License[1] |
Filename extensions | .v |
Website | vlang |
Influenced by | |
Go, Rust, C |
V is a general-purpose programming language with features optimized for "Simple, fast, safe, compiled language for developing maintainable software"[2] The language itself works with the V compiler, written in V itself though was originally written in Go.[3] V compiles down to machine code and a C language backend.[3]
V has no garbage collection in the compiler[4], a module system (known as VPM), and a UI module (maintained by the V language developers)[5]. It also has a section where they promote programs, libraries, and other pieces of software built-in V[6]. The V developers also work on other projects in V such as V-OS.[7]
Language Examples
A normal hello world script.
// This would be found in a v lang hello world file
fn main() {
println("Hello world")
}
V language HTTP/Time modules. Borrowed from the example on the main website (modified for it to work)[8].
import time
import net.http
fn main() {
resp := http.get('https://vlang.io/utc_now') or {
println('failed to fetch data from the server')
return
}
t := time.unix(resp.text.int())
println(t.format()) // 2019-08-16 17:48
}
- ^ "V Lang / LICENSE". github.com. V Language Devs. 2019-01-19. Retrieved 2020-02-25.
- ^ "V Language / Tagline". vlang.io. V Language Developers. Retrieved 2020-02-25.
- ^ a b "V Language / Original Language". vlang.io. V Language Developers. Retrieved 2020-02-25.
- ^ "V Language / Documentation (Memory Management)". vlang.io. V Language Developers. Retrieved 2020-02-25.
- ^ "V Language / V Ui GitHub Repository". github.com. V Language Developers. Retrieved 2020-02-25.
- ^ "V Language / Software". vlang.io. V Language Developers. Retrieved 2020-02-25.
- ^ "V Language / V-OS". github.com. V Language Developers. Retrieved 2020-02-25.
- ^ "V Language". vlang.io. V Language Developers. Retrieved 2020-02-25.