[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [udig-devel] Java 1.5
|
On Thu, 2 Dec 2004, James Macgill wrote:
> At 02:51 PM 12/2/2004, Jody Garnett wrote:
> >David Zwiers wrote:
> >
> >>Hello all,
> >>It appears that we should once again talk about the possibility of
> >>transitioning to Java 1.5.
> >>Advantage:
> >> - Clarity
> >>
> >>Disadvantages
> >> - Mac Support is limited (but so is uDig's current Mac support)
> >>
> >>
> >>Currently much of Java1.5 is already used, but only as part of the
> >>javadoc comments.
> >>
> >>Any thoughts?
> >>
> >Mac support for java 5 is expected in the spring.
> >
> >Generics, Enums and VarArgs are the main advantages for clarity - these
> >are strong advantages given that we are defining API.
> >
> >+1 for me, although I am frustrated with mac development.
> >
> >Chris/James did you have any thoughts on this? I know you are in touch
> >with a few other open-source groups.
> >
> >Jody
>
> Remember to make a distinction between Java 5 runtime and Java 5 compile
> time. iirc many enchantments, inc generics will run under Java 1.4 but
> will not compile under it.
>
> Given that the pool of Mac 'developers' is likely to be small (as opposed
> to users) you may be able to use a subset of Java 5 language enhancements
> (but not API enchancements) without impacting portablity.
>
> Not that I've tested the above theory!
>
> James
>
First off, I'm supporting 1.4 in GeoServer for a long, long time. There
are two reasons for this. The first is that as a server project, the real
users will be people who run it on servers that are already set up and
configured, and on those types of machines people are _much_ more hesitant
to upgrade. They don't want to mess with something that already works,
especially when many people are using it. Related to that J2EE evolves
behind J2SE, so it's only just now getting to 1.4 I think. So that really
doesn't apply to uDig, as it's a client project, and people can easily
upgrade java, indeed the best route is for you to just include, so people
don't have to deal with it at all. The second applies more, and that's
being _truly_ open source. That is to say by going with the bleeding edge
you are dependant on Sun. Java's almost but not quite open source nature
makes it so other JVMs, especially on open source operating systems like
FreeBSD, lag behind. This may change a bit as Sun seems to be making
moves to make Java more open source, but even still it'll take time to
port other operating systems, many are just reaching 1.4 now. The GNU
classpath project (I think that's what it's called, a gnu jvm) is one that
hasn't yet done 1.4. So in going with 1.5 you cut out a small, but
potentially significant, population. I say significant because many times
the people who are strict about open source are very willing to contribute
to new open source projects that they like, and are generally very good.
This is sort of the flip of James's argument about mac developers vs.
users, because most of your users of more obscure open source operating
systems (or hardcore gnu fanatics), are probably good developers (yes, I
know I'm making blanket statements here).
So the first is not an issue for you, the second depends on how much you
care about being _truly_ open source. I personally would stick with 1.4,
but I also haven't examined 1.5 and the benefits it offers, indeed am kind
of willfully keeping away, since I'm committed to 1.4 for a long time.
The one thing this does bring up is the fact that if/when you roll changes
back into geotools you'll have to back port to java 1.4. Which may not be
a big deal, I really don't know, but it's there. And I'm also a bit
against it, just because I know the day to try to upgrade geotools will
come sooner if we have most developers working in 1.5, and I am very
against upgrading geotools.
As for using language enhancements and not API enhancements, I'd say
that's hard to do, as you'd have to willfully just look at 1.4 javadocs
(and maybe some how set your function completion in ide back). It's way
too easy to just put in a nice new method that is in Java 1.5. Mostly
because the new ones make a lot of sense, you wonder what people did
before that. This happened just the other day with a contribution I got
to GeoServer, in the Matcher class.
So that's my take. But I can understand if you'd go to 1.5, even though I
would recommend against it, as I admit my reasons are not especially
compelling.
best regards,
Chris