On Wed, 30 Aug 2006, Phillip J. Eby wrote:
We could do that, after we got rid of any existing code that depends on the old semantics of enumerations.
I could rename the old enumeration to StringEnumeration and introduce a new enum that behaves like what Grant is suggesting.
However, it should be noted that this may lead to interesting problems in schema upgrades. My understanding is that the reason for wanting explicit values (as opposed to simple sequence) is that it allows constant values to be preserved across releases, even if things are added or removed. Second, it allows the use of enumerations as constants for interacting with external systems, like socket mode flags and such.
I should dispell any rumors of constant-ness across schema changes. The value that gets persisted for a new type of enum value is the position of the constant in the sorted-by-constant-name constant list. If someone renames a constant or inserts one alphabetically, that's a schema change.
Andi.. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ Open Source Applications Foundation "chandler-dev" mailing list http://lists.osafoundation.org/mailman/listinfo/chandler-dev
