"The first month of the year is JANUARY which is 0"
Yes but not what any other month is. Additionaly no mention is made as
to the ordering. You are left to assume the sequence. Is FEBRUARY 1,
-1
or is it 4? Is MARCH 2, -1 or is it 8?
Principle of least confusion.
All other things being equal, assume things are the most obvious.
Fine, all things being equal.
I hope I don't ever have to use any of your libraries if you think
it's ok to define the constants in a different order just because the
spec doesn't say you can't!
Frankly, I have modeled months as objects and not ints. That way
methods are used to easily order and manipulate months. Calendars
create their own years and years create their own months and months
create their own days, etc. Currently, the package uses
GregorianCalendar to do the hard work, It just provides a simpler
interface with which to interact.
All I said was that it could be done, not that I thought it was OK. I
have seen some very bad code that works just fine created by overly
clever geniuses.
I was just making the point that is is a mistake to assume anything
about the implementation of a class and to assume that the
implementation will never change. Unfortunately, the communication
skills of software developers are, in general, lacking and one is
forced to assume things about their APIs.
Glen Ezkovich
HardBop Consulting
glen at hard-bop.com
A Proverb for Paranoids:
"If they can get you asking the wrong questions, they don't have to
worry about answers."
- Thomas Pynchon Gravity's Rainbow
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden