On Tue, 1 Apr 2003, Jonathan Leffler wrote:[...]
Nomenclature is important, isn't it?
Oh yes. It's one of my obsessions, as some on this list may have already guessed.
One of them most important (perhaps #1) aspects of code design is proper naming. This applies to both internals and APIs, but for APIs it's obviously doubly important. Good naming greatly simplifies doc writing. Bad naming leads to lots and lots of confusing docs.
Something to start thinking about now, then... There will certainly be DateTime::<various business calendars>. For example, I'm going to need, and therefore probably write, a New York Stock Exchange calendar subclass.
Following my company's internal naming scheme, I would have called it DateTime::Calendar::NYSE, since it's the NYSE calendar as opposed to the TSE (Tokyo), LSE (London), or any other stock exchange, not to mention banking calendars (yes, different than stock market calendars).
But DT::Calendar::X now means the *form* of date calendar X, not the set of days themselves and other information about that set of days that make up a calendar, like start time and end time for the NYSE calendar (yes, potentially different for different days). So you'll need to use some other term for "calendar" used in this sense.
Unless it's thought that business calendar manipulation will be more frequent and useful than Gregorian/Julian/Other calendar manipulation, in which case now might be the time to make that jump, and rename things...
brad