Jump to content

Vala (programming language): Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
IMHO Vala is more influenced by D, than Genie actually. so adding.
typo
Line 3: Line 3:
| paradigm = [[multi-paradigm programming language|Multi-paradigm]]: [[imperative programming|imperative]], [[structured programming|structured]], [[object-oriented programming|object-oriented]]
| paradigm = [[multi-paradigm programming language|Multi-paradigm]]: [[imperative programming|imperative]], [[structured programming|structured]], [[object-oriented programming|object-oriented]]
| year = 2006
| year = 2006
| influenced by = [[C (programming language)|C]], [[C++]], [[C Sharp (programming language)|C#]], [D (programming language)|D]], [[Java (programming language)|Java]]
| influenced by = [[C (programming language)|C]], [[C++]], [[C Sharp (programming language)|C#]], [[D (programming language)|D]], [[Java (programming language)|Java]]
| developer = Jürg Billeter, Raffaele Sandrini
| developer = Jürg Billeter, Raffaele Sandrini
| latest release version = 0.11.2<ref>{{cite web | url=http://live.gnome.org/Vala/Release | title=Vala Releases | date=2010-11-08 | accessdate=2010-11-08}}</ref>
| latest release version = 0.11.2<ref>{{cite web | url=http://live.gnome.org/Vala/Release | title=Vala Releases | date=2010-11-08 | accessdate=2010-11-08}}</ref>

Revision as of 12:09, 20 December 2010

Vala
ParadigmMulti-paradigm: imperative, structured, object-oriented
DeveloperJürg Billeter, Raffaele Sandrini
First appeared2006
Stable release
0.11.2[1] / November 8, 2010; 13 years ago (2010-11-08)
Typing disciplinestatic, strong
OScross-platform all supported by GLib
LicenseLGPL 2.1+
Filename extensions.vala, .vapi, .gir, .c
Websitelive.gnome.org/Vala
Dialects
Vala, Genie
Influenced by
C, C++, C#, D, Java

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

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. 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();
  }
}

References

  1. ^ "Vala Releases". 2010-11-08. Retrieved 2010-11-08.

See also

External links