Jump to content

User:SWinxy/V (programming language)

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by KaiLikesLinux (talk | contribs) at 18:45, 25 February 2020 (V Language Wikipedia Article: --removed). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

V (programming Language)

V Language
Designed byAlex Medvednikov
DeveloperAlex Medvednikov and Community
First appeared2019 (Beta)
OSCross-platform
LicenseMIT License[1]
Filename extensions.v
Websitevlang.io
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
}
  1. ^ "V Lang / LICENSE". github.com. V Language Devs. 2019-01-19. Retrieved 2020-02-25.
  2. ^ "V Language / Tagline". vlang.io. V Language Developers. Retrieved 2020-02-25.
  3. ^ a b "V Language / Original Language". vlang.io. V Language Developers. Retrieved 2020-02-25.
  4. ^ "V Language / Documentation (Memory Management)". vlang.io. V Language Developers. Retrieved 2020-02-25.
  5. ^ "V Language / V Ui GitHub Repository". github.com. V Language Developers. Retrieved 2020-02-25.
  6. ^ "V Language / Software". vlang.io. V Language Developers. Retrieved 2020-02-25.
  7. ^ "V Language / V-OS". github.com. V Language Developers. Retrieved 2020-02-25.
  8. ^ "V Language". vlang.io. V Language Developers. Retrieved 2020-02-25.