I may be wrong, but I think it's preferable not to use 'using',
because it makes difficult to read the code.

2011/1/8 Alexander Krivács Schrøder <[email protected]>:
> Hi.
>
> Are there plans to incorporate using aliases in Vala? It would be very
> handy to have them, especially in cases where you encounter the
> annoying "ambiguous reference" error. If for instance you have a class
> named "Parameter" in some "Very.Long.And.Winded.Namespace" and you try
> to use it, you get this error:
>
> error: `Parameter' is an ambiguous reference between `GLib.Parameter'
> and `Very.Long.And.Winded.Namespace.Parameter'
>
> What are my choices now? All I can think of doing in Vala is to type
> the full name every time, which is clunky and annoying. In C#, I would
> be able to do this:
>
> using vln = Very.Long.And.Winded.Namespace;
> [...]
> var p = new vln.Parameter("woo");
> [...]
>
> Alex
> _______________________________________________
> vala-list mailing list
> [email protected]
> http://mail.gnome.org/mailman/listinfo/vala-list
>
_______________________________________________
vala-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/vala-list

Reply via email to