The Full Wiki

More info on Vala (programming language)

Vala (programming language): Wikis


Note: Many of our articles have direct quotes from sources you can cite, within the Wikipedia article! This article doesn't yet, but we're working on it! See more info or our list of citable articles.


From Wikipedia, the free encyclopedia

Usual file extensions .vala, .vapi, .gir, .c
Paradigm Multi-paradigm: imperative, structured, object-oriented
Appeared in 2006
Developer Jürg Billeter, Raffaele Sandrini
Stable release 0.7.9 (2009-12-19; 28 days ago)
Typing discipline static, strong
Dialects Vala, Genie
Influenced by C, C++, C#, Java
OS Every platform supported by GLib
License LGPL 2.1+

Vala is a programming language that was created with the goal of bringing modern language features to C, without additional runtime requirements and with little overhead, by targeting the GObject object system. It was developed by Jürg Billeter and Raffaele Sandrini. The syntax borrows heavily from C#. Rather than being compiled directly to assembler or to an intermediate language, Vala is compiled to C which is then compiled with the platform's standard C compiler.

For memory management the GObject system provides reference counting. In C, the programmer must manage the addition and removal of references manually but in Vala the management of these reference counts is automated (provided the programmer uses the language's built-in reference types rather than plain pointers).

To use functionality from native code libraries requires writing vapi files that define the interface to the library. Vapi files are provided for a large portion of the GNOME platform, including GTK+.

Code example

A simple "Hello World" program:

void main () {
  print ("Hello World\n");

A more complex version, showing some of Vala's object-oriented features:

class Sample : Object {
  void greeting () {
    stdout.printf ("Hello World\n");
  static void main (string[] args) {
    var sample = new Sample ();

See also

External links



Got something to say? Make a comment.
Your name
Your email address