On Mon, May 18, 2009 at 12:13 PM, [email protected] <[email protected]> wrote: > Peter's suggestion may work for D6, but for D7, I refer people to Eaton's > "How to make good APIs" session from DCDC. Digest version: If you expect > people to extend your list of flags/constants/modes, for the love of god use > strings, not ints. Ints WILL break. Don't be stupid, use strings.
Hummm. Ints, strings, these are just ways to express bits of information. Each character of a string will have approx 5 bit of info (or a bit less, 26 english chars, underscore, thats 27 not 32 but lets say 32). It also must be noted that its unlikely you will use all possible combinations, I bet XRNQW will not be used for example... I am with Peter, his proposal makes sense to me and can code more possibilities than strings.
