ring0 » blog

vala 0.8

tags: vala 2010-04-05 14:32 by sre

Vala 0.8 has been released on March 31th. Apart from the usual added bindings there are the following really awesome features:

chained relational expressions

void main(string[] argv) {
	var number = argv[1].to_int();
	message("number: %d", number);

	if(1 < number < 10)
		message("number is between 1 and 10");
}

regular expression literals

void main(string[] argv) {
	string msg = argv[1];
	message("msg: %s", msg);

	if(/foo.*bar/.match(msg))
		message("string matches foo.*bar");
}

Support of in for arrays

void main(string[] argv) {
	if("--help" in argv)
		message("You can't be helped!");
}

dova profile

This is kind of secret (note: it has not been announced with the release). You can use the dova profile instead of the glib profile. The leightweight glib alternative can be enabled with “–profile=dova”, but it’s still in heavy development and lots of stuff won’t work. You can find out more about dova on gitorious.


Update (2015-12-27)

Project is most likely dead some information about it can still be found on Gnome.