Vala (programming language)
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 (December 19, 2009 ) |
Typing discipline | static, strong |
Dialects | Vala, Genie |
Influenced by | C, C++, C#, Java |
OS | Every platform supported by GLib |
License | LGPL 2.1+ |
Website | http://live.gnome.org/Vala |
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 ();
sample.greeting();
}
}
See also
External links
Search Wikibooks | Wikibooks has a book on the topic of |
- The Vala Programming Language, on GNOME Live!
- LibGee, a collection library for vala.
- Benchmark of Vala versus C# and C
- Val(a)IDE, an IDE for Vala
- Vala Toys for Gedit, a plugin for Gedit that adds support of autocompletion and more, to program with Vala.
- Video of Jürg Billeter talking about Vala at the Gran Canaria Desktop Summit in the summer of 2009.
- Genie is a Vala dialect with a python-like syntax
|
Stub icon | This computer programming-related article is a stub. You can help Wikipedia by expanding it. |
de:Vala (Programmiersprache) es:Vala (lenguaje de programación) fr:Vala (langage de programmation) nl:Vala (programmeertaal) pl:Vala ru:Vala zh:Vala
If you like SEOmastering Site, you can support it by - BTC: bc1qppjcl3c2cyjazy6lepmrv3fh6ke9mxs7zpfky0 , TRC20 and more...