Re: [java-gnome-hackers] Mixing generated and hand-written classes
Brought to you by:
afcowie
From: Vreixo F. L. <met...@ya...> - 2008-03-21 15:58:38
|
--- Colin Walters <wa...@ve...> escreveu: > I don't think something like this would be too hard to achieve with > the current code generator In fact, it is quite easy! Having a direct mapping from Gtk+ to Java is very easy with current code generator, but that way what we would be doing is using in Java an API designed for C!! Do we really want that? Or we prefer a quality API carefully designed for the Java language? With the first option we would have in less than a week bindings for all Gtk+ functions. But would they be a good bindings? I doubt. Only humans, by carefully testing and exploring each of the Gtk+ functions can provide quality Java bindings, both powerful but easy-to-use and easy-to-learn, where things are done in the way a Java developer expects them, and with a good documentation. Seriously, I doubt the Gtk+ documentation is good for Java bindings. (well, in fact I do not doubt, I'm sure it isn't!). Of course, having to hand-coded all our API is much more work, but that is the price we pay for having good bindings. Each hour we waste handcoding good API and docs, is time hundreds of developers won't need to waste learning an ugly, bad documented API. We are not developing an end-user app, but a library many developers will use for writing their apps. Let's do it ok. You may ask, then: why to worry about a code generator? Because this way the ugly and tedious part (the direct mapping, JNI layer, etc) is done automatically!! So we expend our time studying Gtk+ functions and the way they should be mapping in Java, and not writing JNI code!! In fact, thanks to the code generator, I waste less than 1% of my java-gnome work writing code. That is good. I understand that for apps developers it is a pain to wait for the coverage they need. But I really prefer good bindings tomorrow than bad bindings today. And if you really need coverage for a given widget, just request us to implement it!! And contribute, of course! If you use a widget sure you will have good ideas about how it should be implmented in Java! Cheers, Vreixo Abra sua conta no Yahoo! Mail, o único sem limite de espaço para armazenamento! http://br.mail.yahoo.com/ |