
Stewart, Robert wrote:
I don't know the implications of this, but I generally dislike the idea of a silent fallback. I'd prefer to see two interfaces: one throws an exception on out of range values and one that accepts a default value to return in those cases.
If the character has some new property value it means it had the default property value (which isn't really a property, it's more like a "other" or "any") in the previous versions, I'm fairly sure Unicode guarantees this.
It might be useful to determine compatibility when the library starts, perhaps via an initialization call, and use the Strategy Pattern to determine the implementation. (When compatible, a property's accesses are unchecked. When incompatible, the property's accesses are checked.)
That would mean virtual function call overhead, which should be higher than a simple branching in an inlined function.