Vala (programming language)

Article on other languages:

del.icio.us del.icio.us
Digg Digg
Furl Furl
Reddit Reddit
Rojo Rojo
Add to OnlyWire
Vala
Paradigm structured, imperative, object-oriented
Appeared in 2006
Developer Jürg Billeter, Raffaele Sandrini
Influenced by C, C++, C#, Java

Vala is a programming language that tries to bring 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#.

Comparison with C

In comparison to C and C++, Vala uses language-level Reference counting to retrieve unused memory. This memory management system does not keep track of memory handled via pointers, however.

Because Vala code is converted into standard C code before being compiled, it can take advantage of C language libraries such as 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 run () {
		stdout.printf ("Hello World\n");
	}
 
	static void main (string[] args) {
		var sample = new Sample ();
		sample.run ();
	}
}

External links

This article is from Wikipedia. All text is available under the terms of the GNU Free Documentation License.


Giant Panda

Mercedes Car
James Bond Guide
This site monitored by SitePinger.net