Vala (programming language)

  • vala
    vala logo.svg
    paradigmmulti-paradigm: imperative, structured, object-oriented
    developerjürg billeter, raffaele sandrini
    first appeared2006; 14 years ago (2006)
    stable release
    0.46.6[1] / 9 february 2020; 56 days ago (2020-02-09)
    preview release
    0.47.4 / 4 february 2020; 2 months ago (2020-02-04)
    typing disciplinestatic, strong
    oscross-platform all supported by glib, but distributed as source code only.
    licenselgplv2.1+
    wiki.gnome.org/projects/vala
    influenced by
    c, c++, c#, d, java, boo

    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.[2] 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.[3]

    for memory management, the gobject system provides reference counting. in c, a programmer must manually manage adding and removing references, but in vala, managing such reference counts is automated if a programmer uses the language's built-in reference types rather than plain pointers.

    using functionality from native code libraries requires writing vapi files, defining the library interfacing. writing these interface definitions is well-documented for c libraries, especially when based on gobject. however, c++ libraries are not supported. vapi files are provided for a large portion of the gnome platform, including gtk.

    vala was conceived by jürg billeter and was implemented by him and raffaele sandrini, finishing a self-hosting compiler in may 2006.[4]

  • code example
  • see also
  • references
  • external links

Vala
Vala Logo.svg
ParadigmMulti-paradigm: imperative, structured, object-oriented
DeveloperJürg Billeter, Raffaele Sandrini
First appeared2006; 14 years ago (2006)
Stable release
0.46.6[1] / 9 February 2020; 56 days ago (2020-02-09)
Preview release
0.47.4 / 4 February 2020; 2 months ago (2020-02-04)
Typing disciplinestatic, strong
OSCross-platform all supported by GLib, but distributed as source code only.
LicenseLGPLv2.1+
wiki.gnome.org/Projects/Vala
Influenced by
C, C++, C#, D, Java, Boo

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.[2] 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.[3]

For memory management, the GObject system provides reference counting. In C, a programmer must manually manage adding and removing references, but in Vala, managing such reference counts is automated if a programmer uses the language's built-in reference types rather than plain pointers.

Using functionality from native code libraries requires writing vapi files, defining the library interfacing. Writing these interface definitions is well-documented for C libraries, especially when based on GObject. However, C++ libraries are not supported. Vapi files are provided for a large portion of the GNOME platform, including GTK.

Vala was conceived by Jürg Billeter and was implemented by him and Raffaele Sandrini, finishing a self-hosting compiler in May 2006.[4]