A New Language Alternatice to C++, Rust

Val represents a fresh high-level programming language tailored to operate close to the hardware. This brainchild originates from the Northeastern University, who focuses on language design and type-based methods for ensuring memory safety.

The inception of Val emerged from a collaboration with Google and Adobe, exploring the Swift programming language and the principle of mutable value semantics. This principle maintains the autonomy of values to uphold local reasoning. Haskell, Rust, and R are among the languages adopting mutable value semantics.

Starting with Swift due to her familiarity and its support for mutable value semantics, it met many criteria, including compiling to machine code, suitable for systems programming. However, its fusion with other aspects undermined the value semantics. This sparked curiosity to explore a language solely focused on mutable value semantics.

Val takes an approach prevalent in modern imperative programming languages like C++, JavaScript, Python, and Java. While primitive data types behave like values, more complex types, such as arrays or hash maps, exhibit reference semantics, causing changes to be observable across the program.

Mutable value semantics eliminates references from the equation while preserving efficient in-place mutation.

Val targets systems programming, aiming for applications operating close to hardware, demanding optimal machine performance. This includes operating systems, memory-intensive tasks like gaming or image processing, and applications unsuitable for virtual machines or garbage collectors. Embedded applications also serve as an intriguing target.

Val’s Application Though not intended for client-side use, Val might, for example, enable embedding applications like Photoshop in web browsers via LLVM and Web Assembly. The language follows a compilation pipeline similar to C++.

Val’s Development and Future The open-source language, available on GitHub, is a work in progress. While slightly behind schedule, the roadmap aims to release an alpha version for experimentation by developers.

Val should fit into use cases akin to C++ and Rust, aiming to mitigate C++’s safety issues and Rust’s complexities.