Jacob Peddicord

Mono v. Vala: Fight!

June 12, 2009 at 11:20 AM | categories: Programming, Planet Ubuntu | View Comments

Ignore the inflammatory title. I frankly don't care to hear more on the drawn-out debate about patents. Nothing has happened for a long time, just more people yelling at each other over who is right. What I never hear brought up is the C#-like language Vala. For the uninitiated, it's a "self-hosting compiler that translates Vala source code into C source and header files" using GLib/GObject. So you feed it Vala code and it spits out C. Now what is so great about that? 1. No runtimes. When you run an application written with Vala, the OS has no idea. At runtime, Vala code is identical to C. No extra libraries, nothing needed to keep your program running. You could ship a version of your project with just the C code and have no extra build dependencies, though your recipients might question as to why there are a bunch of strangely-named generated variables (_tmp0_, _tmp1_, etc) in there. (Kidding about shipping generated C, see comments.) 2. Nearly infinite extensibility. Since Vala just generates C, the bindings can be derived from C. If you have Vala installed, take a look at /usr/share/vala/vapi/webkit-1.0.vapi. 200 lines! The WebKit bindings are only 200 lines long. And according to the file header, they were automatically generated. What's not to like? According to the Vala roadmap, we may see 1.0 in time for the GNOME 2.28 release. So I want to hear your thoughts: Does this compare, from a technical standpoint, to Mono? Will it become a widely-used language? Is it easy to port an application from Mono to Vala, and vice-versa?

blog comments powered by Disqus
Feed Contact Google+ Twitter LinkedIn GitHub identi.ca OpenID Launchpad