It doesn’t matter how many programming languages we already have, some great minds are always looking for ways to create something new and contribute to the programming community.
A few days ago, Alex Medvednikov has open-sourced a new programming language known as the ‘V language‘. It’s a statically typed programming language, similar to Go and inspired by Rust, Swift, and Oberon.
According to Alex, the creator of V, it’s a simple language designed for building ‘maintainable’ software. As of now, V emits C and works on GCC/Clang for optimized production builds. Just like Rust, it also manages memory at compile time. This language supports Windows, macOS, Linux, *BSD. V also has plans to support Android and iOS later this year.
Main Features of V Language
1. Faster Compilation
V compiles around 1.2 million lines of code per second per CPU core. It focuses on modularity and generates machine code directly. It can also emit C but in that case, the compilation speed will drop to something around 100k lines/second/CPU.
The creator, Alex has also mentioned that this mechanism is at a very early stage and supports x64/Mach-O only. He will try to make it more stable in the upcoming versions.
2. Better Performance
V language comes with a speed of C, built-in serialization, a minimal amount of allocations, C interop without any costs, etc. Thus, the entire V language and its standard library are less than 400 KB in size. You can build this language in 0.4 seconds. Moreover, the creator has also promised to reduce this number to around 0.15 by the end of this year.
3. Safer than Others
V language doesn’t have null, undefined values, global variables, variable shadowing, bounds checking, etc. It supports immutable variables by default. Apart from that, V also supports generics, option/result types, pure functions, and immutable structs.
4. C/C++ Translation
You can translate your V code to C or C++ or use Clang parser to convert C/C++ code to V. This feature is also currently in early-stage but Alex aims to make this feature stable by the end of this year.
As we already said, V is simpler than C++ and offers up to 400 times faster compilation, easy concurrency, compile-time code generation, etc. This language is even faster, safer and maintainable than Python.
Talking about the users, they have mixed reactions towards this new language. I know everyone would appreciate a language with the simplicity of Go and the memory management model of Rust. But as there’s not much proof available, people are skeptical about this language.
Anyway, what do you think about the V language? Share your opinion in the comments below.