Jan Hudec <[email protected]> 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 different: You need to swap the type and 
"this":

namespace Moo {
    bool less_or_equal(this IComparable lhs, IComparable rhs) {
        return !rhs.less_than(lhs);
    }
}

I feel like we should follow C# regarding that. In C# the method must be static 
and must be placed in a static class as well.

Cheers,
Jan-Jaap

____________________________________________________________
GET FREE 5GB EMAIL - Check out spam free email with many cool features!
Visit http://www.inbox.com/email to find out more!
_______________________________________________
Vala-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/vala-list

Reply via email to