A new statically-typed programming language called ‘V’ is now open sourced. The simple, fast, and compiled language helps in creating maintainable software. Alex Medvednikov, the creator of V believes that V is quite like Go programming language and is also inspired by Rust and Apple’s Swift. The language can compile up to 1.2 million lines of code per second per CPU.
The simplicity of Go and the memory management model of Rust is all that the developers expect. The language is currently in the alpha stage. Here is what you can expect from the V programming language.
Performance
The website of this new programming language claims that V is as fast as C programming language. It requires a minimal amount of allocations, and supports built-in serialisation without any runtime reflection. The language can compile to native binaries without any dependencies.
Safety
V is designed for safety and has no null operator, global variables, undefined values, undefined behaviour, variable shadowing. The programming language supports immutable variables, pure functions, and immutable structs by default.
Fast compilation
The programming language can compile up to 1.2 million lines of code per second. The speed is achieved through direct machine code generation and strong modularity. If you decide to emit C code, the compilation speed drops to approximately 100k code per second. On the official website, Medvednikov has also mentioned that the direct code generation is in the very early stage and only supports x64/Mach-O.
0.4 MB compiler
As compared to Go, Rust, GCC, and Clang, V Programming language takes only 400 KB of space. The entire language, standard libraries are just 0.4 MB in size, and it takes only 0.4 seconds to build the code.
C/C++ translation
The language allows you to translate your V code to C or C++. This is another feature that is in an alpha stage. The creator of V programming aims to release the stable version of this feature by the end of this year.