db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rick Hillegas <Richard.Hille...@Sun.COM>
Subject Re: Requiring Java 5 compiler
Date Tue, 09 Oct 2007 14:03:08 GMT
Hi Julo,

The Java 5 compiler lets us write product and test code which is 
optional--that is, the code only runs if the VM is sufficiently 
advanced. This has the following benefits:

1) For runtime-optional code, we can take advantage of optimizations 
introduced by the Java 5 libraries.

2) For runtime-optional code, we can take advantage of the extra type 
checking introduced by Java 5.

3) We can write runtime-optional tests which verify that Derby plays 
well with customer-written code on advanced VMs.

The net effect of 1-3 is better Derby performance and quality when run 
on advanced VMs. In addition,

4) It moves us further toward a standard build environment. That, in the 
long run, will improve the out-of-box experience for newcomers to 
derby-dev. It also reduces the release-time thrashing caused by the fact 
that the release manager's environment is so different from the 
environment of the average developer.

5) It moves more of the onus of build failures onto the developers who 
make the build-breaking changes.

The net effect of 4-5 is reduced thrashing during development and release.

Hope this helps,
-Rick



Julius Stroffek wrote:
> Hi Rick,
>
> I am just thinking what exact benefits will derby gain when using java 
> 5 features.
>
> Both Java 1.4 and Java 1.5 use JDBC3 interface and therefore I would 
> expect derby to behave the same way on both java versions. Is this 
> supposed somehow to change? Which derby features would be affected by 
> this? Any plans for near future?
>
> Thanks
>
> Julo
>
>
> Rick Hillegas wrote:
>> Rick Hillegas wrote:
>>> I would like to start writing Derby code which makes use of Java 5 
>>> features. More specifically:
>>>
>>> 1) I would like to take advantage of the Java 5 extensions for 
>>> ease-of-use and stronger type checking.
>>>
>>> 2) I would like to be able to write regression tests which verify 
>>> that user-written Java 5 code runs correctly as Derby functions and 
>>> procedures.
>>>
>>> Would anyone object to our requiring that developers use a Java 5 or 
>>> later compiler to build Derby? I believe that we would still require 
>>> the presence of the 1.4 libraries and the expectation would continue 
>>> to be that the compiler must compile down to 1.4 classes.
>>>
>>> Thanks,
>>> -Rick
>>>
>>>
>> Discussion on this thread has died down so I would like to summarize 
>> what has been said so far:
>>
>> a) Java 5 source can't be compiled down to 1.4 class files. This 
>> means that any code which is necessary for Derby to operate must be 
>> 1.4 source. This means that mandatory code cannot take advantage of 
>> Java 5 features such as enums, generics, annotations, and varargs.
>>
>> b) The CDC small device platforms require 1.4 level class files. Java 
>> 5 class files will not run on CDC platforms.
>>
>> c) There is no problem with using the Java 5 compiler to compile 1.4 
>> source into 1.4 targets. This already works today for those of us 
>> whose default compiler is Java 5 or Java 6.
>>
>> d) Java 5 is available on all likely development platforms, including 
>> Windows, Linux, Mac OS X, and Solaris.
>>
>> e) If we required Java 5 (or higher) in order to compile Derby, then 
>> we could use Java 5 features in optional engine code and in optional 
>> tests.
>>
>> I propose that we require Java 5 (or higher) in order to build Derby. 
>> If there are no objections and no further discussion, then I intend 
>> to call a lazy consensus vote on this proposal.
>>
>> Regards,
>> -Rick
>


Mime
View raw message