Vala (programming language)
Vala is an object-oriented programming language with a self-hosting compiler that generates C code and uses the GObject system.
Paradigm | Multi-paradigm: imperative, structured, object-oriented |
---|---|
Developer | Jürg Billeter, Raffaele Sandrini |
First appeared | 2006 |
Stable release | 0.56.14
/ 13 November 2023 |
Typing discipline | Static, strong, inferred, structural |
OS | Cross-platform all supported by GLib, but distributed as source code only. |
License | LGPLv2.1+ |
Filename extensions | .vala, .vapi |
Website | vala |
Influenced by | |
C, C++, C#, D, Java, Boo |
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. Its developers, Jürg Billeter and Raffaele Sandrini, wanted to bring these features to the plain C runtime with little overhead and no special runtime support by targeting the GObject object system. Rather than compiling directly to machine code or assembly language, it compiles to a lower-level intermediate language. It source-to-source compiles to C, which is then compiled with a C compiler for a given platform, such as GCC or Clang.
Using functionality from native code libraries requires writing vapi files, defining the library interfaces. Writing these interface definitions is well-documented for C libraries. Bindings are already available for a large number of libraries, including libraries that are not based on GObject such as the multimedia library SDL and OpenGL.