Re: [Vala] Extension Methods



2009/3/6 Uwe Strempel <u strempel googlemail com>:
Hi,
yes you are right.
C# 3.0 syntac for inner-type declaration is not the best.

This syntax:
       public int string.count_words() {
               return this.split_set(" .?").length;
       }
might be better.
Thanks,
regards
Uwe

That would be really nice for when subclassing is unavailable, like
when the object is returned by an external library. I've been editing
the vapi file to add convenience methods to Sqlite.Statement. I
suppose you could do the same with the glib-2.0.vapi. Without the
ability to patch static methods we are encouraged to hack the vapi's,
which hurts standardization. All for the love of syntax sugar :).

-Sam Danielson



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