
14 Jul
2006
14 Jul
'06
8:24 a.m.
Interestingly, your Cyclic class idea may have practical purposes beyond enumeration. Integers modulo some number are also cyclical, and can come in very handy. In fact, raw unsigned ints are modulo 2^32 (or something like that), so they really ought (under one interpretation) to be members of Cyclic rather than Bounded. It would certainly be more efficient, since you wouldn't need to do any overflow checking, and the cpu implements the Cyclic operations, but not the Bounded operations. Anyhow, just thought I'd mention that this isn't useful only for "ordinary" cyclic objects like dates. -- David Roundy