User:SWinxy/V (programming language): Difference between revisions
Tiraboschi (talk | contribs) A few small fixes. |
Tiraboschi (talk | contribs) Submit as an AfC |
||
Line 1: | Line 1: | ||
{{AFC submission|||ts=20200209100019|u=Tiraboschi|ns=118}} |
|||
{{Redirect|V|V programming language}} |
{{Redirect|V|V programming language}} |
||
{{About||other programming languages named V|V (disambiguation)#Computing|other uses|V (disambiguation)}} |
{{About||other programming languages named V|V (disambiguation)#Computing|other uses|V (disambiguation)}} |
Revision as of 10:00, 9 February 2020
Review waiting, please be patient.
This may take 2 months or more, since drafts are reviewed in no specific order. There are 1,756 pending submissions waiting for review.
Where to get help
How to improve a draft
You can also browse Wikipedia:Featured articles and Wikipedia:Good articles to find examples of Wikipedia's best writing on topics similar to your proposed article. Improving your odds of a speedy review To improve your odds of a faster review, tag your draft with relevant WikiProject tags using the button below. This will let reviewers know a new draft has been submitted in their area of interest. For instance, if you wrote about a female astronomer, you would want to add the Biography, Astronomy, and Women scientists tags. Editor resources
Reviewer tools
|
Paradigms | |
---|---|
Designed by | Alexander Medvednikov[1] |
Developer | Alexander Medvednikov[1] & Other open source contributors |
First appeared | 2019[2] |
Stable release | |
Typing discipline | |
Platform | x86-64 x86 arm64 arm |
OS | Linux, macOS, Windows, FreeBSD, OpenBSD, Solaris, Android |
License | MIT[3][4] |
Filename extensions | .v, .vh, .vsh |
Website | www |
Major implementations | |
GCC, Clang, MSVC | |
Dialects | |
Good Ol' Fashioned V | |
Influenced by | |
Numerous: AMPL, AWK, csh, C++, C#, Objective-C, D, Go, JavaScript, Julia, Limbo, LPC, Perl, PHP, Pike, Processing, Python, Ring,[5] Rust, Seed7 |
V (/viː/, as in the letter v), also known as Vlang, is a general-purpose, procedural computer programming language designed and maintained by Russian programmer Alex Medvednikov. V is very similar to Go, ghosting its syntax and concurrency system, but implements a memory management scheme and other safety features similar to Rust. The first release of the V compiler was originally written in Go, but is now self-hosting and can further transpile to Javascript and C. V was written to specifically focus on being easy to learn, fast, and safe. A consistent claim of the language is its ability to compile up to 1.2 million lines of code per second, with the resulting binary performing within 3% of an equivalent C program, and that it can as such compile its own compiler in under a second.[4]
History
The V programming language was first documented in March 2019, after a period of being listed as a new language used specifically to create Volt, a social networking app created by V designer Alex Medvednikov.[1] Until June, no source code for V was released; the website simply hosted the specification for the language, its features, and an online 'playground' to test V code. on 22 June, the V GitHub repository received its first commit, version 0.0.12.[6] It was created with the intent of having a very small memory footprint, small binary sizes, fast compilation, and of being safe, with features such as checking for type-errors at compile-time, lacking null pointers, and defaulting to immutable objects. At launch, V only supported Linux and macOS, but now supports many others.
As of November, V is considered to be in alpha, as many of its claims are still a work in progress.[4] According to V's official website and GitHub repository, the first stable release, version 0.2, is due late January 2020, and release 1.0 is due 2020.[4]
Design
V is influenced by Go , Python, C++ and Rust; but aims on being self contained and still achieve greater simplicity, security, and fast compilation.
The key design features are:
- Simplicity: A "one-way" system similar to Python's "There's Only One Way To Do It"
- Safety: No null variables or pointers, no global variables, no undefined behavior, and variable immutability by default
- Memory management similar to lobster with no garbage collection
- A Read-Eval-Print-Loop environment
- Hot reloading
- A modular but powerful standard library, notably implementing a cross-platform, native graphics library
Comparison & Performance
V's first appearance in the Web Framework Benchmark in January 2020 ranked V's alpha release second place.
Criticism
V has received criticism across sources, generally questioning its claims to performance, safety, and lack of dependencies. It has, especially prior to the source code's release, been considered vaporware.[7][8]
On 22 June, Alex stated in the release announcement for V's source code release that there are "lots of hacks I'm really embarrassed about" and that it contains "a lot of ugly C code", but that it will be "quickly cleaned up in the coming weeks".
Examples
Hello World
A V hello world appears similar to a Rust equivalent, but lacks semi-colon line endings and allowing the use of single quotes to denote strings:
fn main() {
println('Hello World!')
}
A Simple Website
A simple website using V's standard library web framework, vweb:
module main
import vweb
pub struct App {
mut:
vweb vweb.Context
}
fn main() {
vweb.run<App>(8080)
}
fn (app mut App) index() {
app.vweb.text('Hello, world from vweb!')
}
pub fn (app &App) init() {}
pub fn (app &App) reset() {}
Citations
- ^ a b c "Volt | <1 MB desktop client for Slack, Skype, Twitter, Facebook, Gmail and more". Retrieved 17 November 2019.
- ^ Open-sourced with V 0.0.12
- ^ a b "The V Programming Language". Retrieved 17 November 2019.
- ^ a b c d "vlang/v: Simple, fast, safe, compiled language for developing maintainable software. Compiles itself in <1s with zero dependencies. Stable release in November 2019". Retrieved 17 November 2019.
- ^ "Introduction". Ring 1.10 documentation. Ring (programming language). Retrieved 27 June 2019.
- ^ "V 0.0.12 open-source release · vlang/v@d32e538". Retrieved 17 November 2019.
- ^ "The V Programming Language: Vain or Virtuous? | Hackaday".
- ^ "The V programming language is now open source - is it too good to be true? | Packt Hub". Retrieved 17 November 2019.