Yes, I know what you mean.
That’s why other people use the name() or standard Java serialization.
For instance, I could just as easily use my hashmap inside the enum (de)serializer. This hashmap uses the name of the enums as lookup. But since string hashing is butt slow I don’t use it. And serialization depends on reflection which is slow too, so I don’t use it either.
In my special case I still use ordinal during (de)serialization to binary files.
Details:
I use enums to represent Unicode property names. The scheme doesn’t change a lot and usually only elements are added. So the only problem might be that the Unicode consortium declares one particular enum element as deprecated - but in that case the binary file will just not include this value anymore and a little bit of dead code is left in the source code. I think that’s okay. And if it becomes a problem, then I can use standard serialization or enum names in a future version - it’s not much of a change (a few lines only).
I think that Kecon will have to deal with that problem somehow similar: A 0-based index which is used for anything else than just a meaningless id will make problems. It’s not only the ordinal() that has this problem. It might also depend on the usage of that 0-based value. For my usage it’s okay to use ordinal.