Skip navigation.

Vala 0.0.6 released

Bag of Software
Bag of Software

We are pleased to announce version 0.0.6 of Vala, a compiler for the
GObject type system.

Changes since 0.0.5
* Improve interface support.
* Support do loops.
* Improve array support.
* Improve enum support.
* Add automated testing infrastructure.
* Fixes for prefix and postfix operators.
* Add more types to GLib bindings.
* Many bug fixes.

Vala is a new programming language that aims to bring modern programming
language features to GNOME developers without imposing any additional
runtime requirements and without using a different ABI compared to
applications and libraries written in C.

valac, the Vala compiler, is a self-hosting compiler that translates
Vala source code into C source and header files. It uses the GObject
type system to create classes and interfaces declared in the Vala source
code. It's also planned to generate GIDL files when gobject-
introspection is ready.

The syntax of Vala is similar to C#, modified to better fit the GObject
type system. Vala supports modern language features as the following:

* Interfaces
* Properties
* Signals
* Foreach
* Lambda expressions
* Type inference for local variables
* Generics [PLANNED]
* Non-null types [PARTIAL]
* Assisted memory management
* Exception handling [PLANNED]

Vala is designed to allow access to existing C libraries, especially
GObject-based libraries, without the need for runtime bindings. Each to
be used library requires a Vala API file at compile-time, containing the
class and method declarations in Vala syntax. Vala currently comes with
experimental bindings for GLib and GTK+. It's planned to provide
generated bindings for the full GNOME Platform at a later stage.

Using classes and methods written in Vala from an application written in
C is not difficult. The Vala library only has to install the generated
header files and C applications may then access the GObject-based API of
the Vala library as usual. It should also be easily possible to write a
bindings generator for access to Vala libraries from applications
written in e.g. C# as the Vala parser is written as a library, so that
all compile-time information is available when generating a binding.

More information about Vala is available at

http://vala.paldo.org/

The Vala Team

Jürg Billeter and Raffaele Sandrini

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Could fill a very important niche need by Anonymous George (not verified)
Trading one problem for many by Anonymous George (not verified)

Re: Trading one problem for many

No, it's not the same, it's much less problematic than with e.g. autotools. The main reason is that Vala is not a preprocessor/macro language like m4 in autotools or gob, valac parses and compiles the complete source code. That means that if valac doesn't report an error, it guarantees that the generated C code is valid, so assuming no bugs in the Vala compiler or in the C library bindings, you won't ever see a GCC error.

We will support generating #line directives, so that e.g. gdb can match instructions to lines in the Vala source file (instead of the generated C file), that will also help when bugs in valac cause GCC error or warning messages to debug the problem.

Again.. Vala just looks

Again.. Vala just looks great! I really hope this makes it into the hearts of gnome/gtk application developers and we can use this to speed development time for our favourite platform..

Re: Trading one problem for many by Anonymous George (not verified)

The first C++ compilers

The first C++ compilers generated C code as well... There is no reason why Vala couldn't compile directly to machine code at some point, but this is the easiest solution for now.

Nice idea, hopefully this

Nice idea, hopefully this takes off...

Pretty nice but did you see this ... by Anonymous George (not verified)

Or Eiffel for that matter

You may as well tout Eiffel, which complies via C so is fast, has inline C and ASM if you need it, OOP, automatic documentation, garbage collection, unit testting, automated contract driven randomised testing, contracts, templates/generics, and a GPL IDE and compiler suite...

EiffelVision2 example code which is cross platform and uses GTK+ on X11.

The reality, however, is that D, Eiffel, and likely Vala will remain niche languages. That's not to say they're not great languages, they are! It is just that it is unlikely they will ever garner a critical mass of interest and become competitive with C++ and C for mindshare. Vala is still young though, so who knows...

Eiffel? Fast? by Anonymous George (not verified)

Eiffel unusable for most libraries

Eiffel has some nice ideas and DBC is very interesting but it has many drawbacks for practical use, e.g. you can't develop shared libraries (i.e. .so or .dll libraries) because there is absolutely no ABI-compatibility, IIRC.

Vala, in contrast, can be used wherever you could use gobject/gtk-based C libraries or applications before, you don't lose any compatibility advantages. C applications can use Vala libraries and Vala applications can use C libraries and it'd be easy to generate bindings to Vala libraries for many other languages. The main difference is that Vala is not an island like many of the niche languages, you can mix Vala and C relatively easy and you could even go back anytime to C by just deleting the Vala source files and keeping the generated C code...

Unusable for most libraries by Anonymous George (not verified)

Mono and C++ are two

Mono and C++ are two completely different beasts when it comes to performance. I'm pretty sure that desktop elements written in Vala could perform well enough to be accepted in the desktop platform. Obscurity of the language might be a counter-argument, but that should be helped by the similarity to C#.

D is much older and more complete than Vala of course, but not based on the GObject system and has a slightly more unusual syntax.

This is a really neat idea. by Anonymous George (not verified)

Well, not really. It's still

Well, not really. It's still a programming language, very similar to C#. Which then gets translated to C code making use of some advanced GLib features.