On 08/01/2009 04:36 PM, Łukasz Pankowski wrote:
HelloAccording to the Vala tutorial "Finally Vala has a mechanism called Type Inference, whereby a local variable may be defined using var instead of giving a type, so long as it is unambiguous what type is meant." Type Interface works great for owned variables (for example in declaration of variable b below) but not for weak variable (neither declaration of c2 nor c3 works). I would prefer just "weak" (as in declaration of c2) as shorter, but maybe "weak var" would be more readable/discoverable? What do you think about the idea? Would this be hard to implement? class Foo {} void main () { // var for short Foo a = new Foo(); var b = new Foo(); // no `weak' for short weak Foo c1 = a; weak c2 = a; // syntax error weak var c3 = a; // syntax error }
I and Julien proposed that, but juergbi closed it as WONTFIX without discussion.
Maybe if more people express their opinion, we could change his mind? See this bug: http://bugzilla.gnome.org/show_bug.cgi?id=586486 _______________________________________________ Vala-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/vala-list
