[Vala] Lets talk about some easier stuff before this controversial one.



On Fri, 2008-08-22 at 11:54 +0200, Jürg Billeter wrote:
On Fri, 2008-08-22 at 05:24 -0400, Yu Feng wrote:
On Fri, 2008-08-22 at 11:04 +0200, Jürg Billeter wrote:
Another direction of this patch is to allow small wrapping code in
the .vapi declarations (which might ease the vapi authors's life)

This is the only place where I might consider it useful. However, so far
I'm not convinced that it really helps, see my other response.

intended for binding (again, using some asm wrap a call to int13) and I
began with .vala files because I thought they were easier to do
experiment with. 

Perhaps the binding authors can find more examples? in Samba and GST
bindings? If we put it to upstream people will eventually find use
cases. It should be rare.

To pull the vala GList wrappers out I need to patch the <generic>
(valagenis?) to allow overriding with respect of generic. The patch is
already large and it is not wise to make it larger before positive
responses.

How much can this vapi-only patch hurt vala in a long run?

The patch is already getting quite big, and it seems that you've added a
partial C parser in there. 
That's what I was worrying about several month ago. The parser parses
identifiers and look for the formal parameters, the result, and "this". 
I thought it was difficult but it turned out not much. 

Before I'm considering maintaining this, I'd
need a strong use case, so far I haven't seen one that would justify it.

I am happy as long as I've made it possible. I understand your feelings
too. Therefore I won't be very unhappy if the patch was hung there.
Nevertheless we can try to separate useful stuff(if there is) from the
patch first.
See
http://bugzilla.gnome.org/show_bug.cgi?id=548969

If this works we can then remove
---
    public override string get_default_cname () {
        // return cname of wrapper method
        if (cname == null) {
            cname = "_dynamic_%s%d".printf (name, dynamic_method_id++);
        }
        return cname;
    }
---
in valadynamicmethod.vala
and kill the replica wrappers.

Jürg





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