Hacking in Vala

In order to get up and running with the Vala Programming Language , which has hopelessly little documentation and resources, I tried writing a test project in Vala and GTK+. From the Wikipedia definition of Vala as “a programming language created with the goal of bringing modern language features to C” , I was expected some kind of GObject based version of C++. But I received a pleasant surprise. Vala’s syntax and features are more like C# and it compiles to good old unmanaged code not all that .NET Managed stuff, which made GTK# so annoying.

I also found that the language was , overall, quite productive and convenient to work with. The test “snake” game I made in Vala and GTK+ was up and running in less than a day. I also liked the compiler which was quite easy to use,
literally all it took was the command:

valac –pkg gtk+-2.0 mysource.vala mysecondsource.vala …

It was also nice to see that my source compiled successfully without any changes or any extra “porting” code on both Windows and Ubuntu. In fact, I was so pleased with the end result that I hosted it, here are the download links to both versions:
Download 1
Download 2

No comments:

Post a Comment