Compiler release for the Vala programming language 0.50.0

Published new version of the compiler for the programming language Vala 0.50.0. The Vala code is translated into a C program, which, in turn, is compiled into a binary file and executed at the speed of an application compiled into the object code of the target platform. Vala is the most used language in GNOME after C (C, Vala, Python, C++) and also the main language in Elementary OS.

The Vala language is very similar in syntax to C# and fully implements the object-oriented approach. Supports introspection, type inference, garbage collection due to automatic substitution of destructor calls at compile time (ARC as in Swift), lambda functions, the concept of signals and slots similar to Qt, but implemented at the language level, string types, generic programming, array slices, the foreach collection operator, delegates, closures, interfaces, properties, and exceptions.

Most notable changes:

  • New keyword With for syntax cascading calls. Within with, the creation of local variables is supported:

    with(varx=y())

    Calling functions that return a value:

    with(y())

    Signal connection, strict non null mode and calling new "with" recursively.

  • New syntax slices - now emptiness is considered as the first or last element of the collection.

    array[begin:] => array[begin:array.length-1] array[:end] => array[0:end] array[:] => array[0:array.length-1]

  • Simplified rewriting C-projects to Vala in parts (when the project contains many calls to Vala code from C and vice versa).
  • Implemented non-virtual signals with a function body.
  • Provided by descendant namespace inheritance.

Source: opennet.ru

Add a comment