Re: [Java-gnome-developer] handlers as ints?
Brought to you by:
afcowie
From: R. A. R. D. <riv...@ya...> - 2003-11-17 17:05:32
|
--- Mark Howard <mh...@ca...> wrote: > On Mon, Nov 17, 2003 at 10:53:35AM -0500, Jeffrey Morgan wrote: > > > 64bits OSes? As I see it, two solutions are posible: 1. Have a > handler > > > table to make the conversion, 2. Change everything to long and > > > recompile. > > Since we're using jni, some recompilation will have to be done for > each > architecture anyway. Why is it such a bad thing to use longs on 64 > bit > architectures and ints on the others? > Advantages 1. Only one code to handle all architectures. Only a tiny piece of C code have to be conditionally compiled on every platform. The rest is the same. 2. Java code can't play with handlers, they can just take it, not operate it, thus avoiding possible bugs. 3. Once the gnome-java package is installed in a platform, the applications on top of it are truly platform independent, so for final users is easier to install: they don't need to download the sources and compile, they only need to download the application and install it, it will work on any architecture. That's one of the beauties of Java. corollary: Commercial applications based only on gnome-java and other java packages will be available on all architectures, not only in x86 as is the usual. > I would expect your proposal to have unnecessary run-time performance > hits. Portability ussually have a cost, in this case one more indirection when accessing a GTK/GNOME handler (Instead of get int handle field, it should be get Handle field, then get int/long handle field). In my case I vote for one more indirection with total arch independence. Rivas. __________________________________ Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard http://antispam.yahoo.com/whatsnewfree |