[tz] Java & Rearguard

Clive D.W. Feather clive at davros.org
Sun Jun 2 20:10:43 UTC 2019


Stephen Colebourne said:
>> Yes, that was a real eye-opener to me. It means the Java developers could add
>> negative-DST support to Java without changing Java's documented API. From my
>> point of view it's a bug fix that's needed for POSIX compatibility anyway.
> With Java, it is wrong to assume that the documented API is the only
> issue when considering a change.

Then how do I, as a developer, know what I am and am not promised by the
API? That's the whole point of having an API and documenting it - it's a
contract between the two parties and you can only rely on what is in the
contract.

That's the basis on which we wrote the C Standard. There may be ambiguities
but if it's not mentioned at all then you can't rely on it. (The classic
example in C is that a "byte" is not required to be 8 bits, just at least 8
bits. I've programmed on a machine where a byte - the smallest addressable
object - was 16 bits.)

-- 
Clive D.W. Feather          | If you lie to the compiler,
Email: clive at davros.org     | it will get its revenge.
Web: http://www.davros.org  |   - Henry Spencer
Mobile: +44 7973 377646


More information about the tz mailing list