Re: [Vala] [RFC] Extension methods (Re: maemo5 hildon input mode)

2010-02-10 Thread Jan-Jaap van der Geer
Jan Hudec b...@ucw.cz wrote: This looks like another use-case for extension methods in a day. I'd like to see them as well. namespace Moo { bool less_or_equal(IComparable this lhs, IComparable rhs) { return !rhs.less_than(lhs); } } The C# syntax is actually a little bit

Re: [Vala] [RFC] Extension methods (Re: maemo5 hildon input mode)

2010-02-10 Thread Jiří Zárevúcky
Jan-Jaap van der Geer píše v St 10. 02. 2010 v 02:34 -0800: Jan Hudec b...@ucw.cz wrote: This looks like another use-case for extension methods in a day. I'd like to see them as well. It might be useful, in some cases. It should be noted that extension methods can only access class'

[Vala] [RFC] Extension methods (Re: maemo5 hildon input mode)

2010-02-09 Thread Jan Hudec
Hello, This looks like another use-case for extension methods in a day. Extension methods in C# work are static methods defined anywhere, that can be called like (instance) methods of some particular class or interface. They would make perfect way for add-on libraries to provide convenience