Vala (programming language)

Vala is an object-oriented programming language with a self-hosting compiler that generates C code and uses the GObject system.

Vala is syntactically similar to C# and includes notable features such as anonymous functions, signals, properties, generics, assisted memory management, exception handling, type inference, and foreach statements.

It aims to bring modern programming language features to GNOME developers without imposing any additional runtime requirements and without using a different ABI, compared to applications and libraries written in C. The syntax of Vala is similar to C#, modified to better fit the GObject type system.

[3] Vala was conceived by Jürg Billeter and was implemented by him and Raffaele Sandrini, who wished for a higher-level alternative for developing GNOME applications instead of C. They liked the syntax and semantics of C# but did not want to use Mono, so they finished a compiler in May 2006.

[5] Vala uses GLib and its submodules (GObject, GModule, GThread, GIO) as the core library, which is available for most operating systems and offers things like platform independent threading, input/output, file management, network sockets, plugins, regular expressions, etc.

The only detail one needs to worry about is to avoid generating reference cycles, because in that case this memory management system will not work correctly.

There is also a library called Gee, written in Vala, that provides GObject-based interfaces and classes for commonly used data structures.

program (see also GTK hello world) in Vala: The statement Gtk.main () creates and starts a main loop listening for events, which are passed along via signals to the callback functions.