Val is the latest high-level programming language that programmers can now work with. It is the work of a woman, Dimi Racordon, a doctoral student at Northeastern University in Boston, who is working on language design and type-safe memory approaches, The NewsTack reports.

Val was originally a byproduct of the research that Dimi Racordon was doing with Google and Adobe on the Swift programming language and the discipline of variable value semantics, which maintains value independence to support local reasoning. Haskell, Rust, and R are other examples of languages that use variable value semantics.

“This is a project that started around two years ago. I wrote the paper, I collaborated with great people at Google and Adobe. After this paper, I had a small idea in the back of my head and I thought, oh, we’ll try implementing some stuff, it will be a two, three weeks project. And it’s been two years”, Racordon told The New Stack.

Her idea of a language that is all about variable-value semantics is one of the main reasons it created Val.

“Mutable value semantics is a programming discipline that really focuses on notional values. So if I have an array of things, for example, the value of this array is the most important concept that I want to manipulate. That gives me local reasoning”, she said.

Programming languages such as C++, JavaScript, Python, and Java distinguish between primitive data types such as integers or sometimes strings. These types behave like values, she says. Changing the value of an integer doesn’t create an observable side effect elsewhere in the program. This is not the case for other data types, such as aggregates, arrays, or hash maps, because they have reference semantics.

In her view, the optimizer must account for the fact that other references may exist and that some seemingly unrelated part of the program may need the value being mutated, so it is better to do nothing than to compromise that reference architecture.

The language is intended for system programming. It is mostly recommended for applications that work close to the metal and need to squeeze as much performance out of the machine as possible.

This includes uses such as operating systems, memory-intensive applications such as video games or image processing, and other applications that can’t afford a virtual machine or garbage collector. Embedded applications are also “a very interesting target,” she said.

For the moment Val is not something that would be used on the client side, but it could for example be used to embed something like Photoshop into a web browser via LLVM and then Web Assembly. Val has a similar build pipeline as C++.

And although the open source language is available on GitHub, it’s still being created. Racordon is looking for contributors to help develop it. The goal is to make it possible to download a compiler and write an app by the end of the year, she said.

She said Val will fit the same use cases as C++ and Rust, but without the safety issues of C++ and the complications of Rust.

Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Editor @ DevStyleR