Gorilla3D

Blogs of my work and thoughts

How the language Vala can speed up development time frames.

First off Vala is a language that is very much like C#. It does have some oddities and missing features, but other then that the syntax isn't so different. Vala is a language that compiles to C code, not to virtual machine byte code. This is not a new concept and there has been a few translation languages before, Haxe (ActionScript 3 like), ShedSkin (Python), Hiphop (Php). However they all push towards C++ and has a high level of abstraction to support the dynamic typing in those languages.

Vala does have a level of abstraction, however is in C code, not C++ and its based on gobject. GObject is a cross platform library to help C developers code in sane object oriented fashion. There are a lot projects that use gobject so its not some middle-ware that no one would be willing to used along side your c generated code. Given that, Vala's C code, can be used in any project that is okay with accessing the object with the Gobject interface. It can produces headers and libraries making a solid bridge between any language that supports Gobject. This includes, C++, Java, Ruby, Python, Php, Lisp, .Net/Mono .

What makes Vala so great?

Vala is fast. Object allocation is its weaker spot and this is due to Gobject, but its very close to a pure C implementation. It you are looking to get around the same speed, you'd need to write it "c-like", this is no different if in the event of using a language like C++.

Vala is safer then C. You can still get segment faults and crashes, but the likeness of getting memory corruption is very small.

Vala is cross-platform, the very basics of Vala works on Linux and Windows, I haven't tested Mac OSX, but there are reports it works on there as well. As long as you use cross platform libraries with it, then it can also work.

Vala can use C. Vala has what's called VAPI, a wrapper around c headers to make calling C functions "pretty" and "Like Vala!".

C can use Vala, like I said before the middle wear is gobject, but its a proven way to allow C developers gain the benefits of many features that are hard to implement in C code.

Vala is like C#, which is better then Java. Vala has much less boilerplate for certain language features compared to C#.

What makes Vala not so great?

Vala's toolset is lacking. IDE support kind of sucks, the most you get is auto-complete and syntax highlighting.

Vala's compiler is not great at forcing you to be safe. Because its tied so closely to C I don't know how close they can get.

Vala's debugger doesn't exist. You have to look at the c code it generates to find out where it might be happening. So in result you have to use a C debugger to find the bad C code. What Vala outputs as far as C is concern is still readable, so its not impossible or even that hard, just a pain when you manage to crash Vala.

Its a new look at old ways. Vala doesn’t invent anything new, items like concurrency, distributed system programming, these are things that C can do with the right libraries, but its not easy, and not any easier in Vala.

Conclusion

Support, there is the mailing list, but that really is only avenue to support. There isn’t 30 years of resource behind this language. Given that if you choose Vala, make sure you understand the languages and its limits on every platform, before picking it as the de facto language to program in. In short, Vala is a great tool to use. My productivity while using Vala, is alongside programming in PHP. Using it on the Linux/GNU Operating system is the best way to use this language. GUIs, Games, even Web Services are perfect examples of Vala, as long as your okay with staying on Linux/GNU. Given that I have been using Vala on windows as well, its still workable, but getting libraries to link is a seemingly impossible task. Once that huddle is done, its really not that bad.

Multidimensional Arrays in C++ for a tilemap in SFMLChoosing a Language for High Performance Web Development