[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Vala] [ANNOUNCE] Vala 0.1.6 - Compiler for the GObject type system



On Sun, 2008-01-20 at 20:23 +0100, Michael 'Mickey' Lauer wrote:
> Jürg Billeter wrote:
> > Changes since 0.1.5
> >  * Add support for instance delegates.

public delegate void Maman.InstanceCallback ();

class Maman.Bar : GLib.Object {
	void do_instance_action () { }
	static void main (string[] args) {
		var bar = new Bar ();
		InstanceCallback instance_cb = bar.do_instance_action;

		// this calls do_instance_action on bar
		instance_cb ();
	}
}

> >  * Support conditional method compilation.

[Conditional (condition = "CONDITION")]
public void some_conditional_method () {
}

This method will be ignored unless you pass -D CONDITION to valac.

> >  * Add basic support for method pre- and postconditions.

interface Foo {
	public abstract int bar (int x)
		requires (x > 0)
		ensures (result > 0);
}


> Anyone with short examples for the new language features among these?

Hope that helps,

Jürg



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]