Boost logo

Boost :

Subject: Re: [boost] Unicode: what kind of binary compatibility do we want?
From: Rogier van Dalen (rogiervd_at_[hidden])
Date: 2009-06-02 12:54:32


On Tue, Jun 2, 2009 at 17:21, Mathias Gaunard
<mathias.gaunard_at_[hidden]> wrote:
> 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.

I think that's correct. The Unicode Standard 5.0 says (section 3.5, D26, p 84):

"Default property value: The value (or in some cases small set of
values) of a property
associated with unassigned code points or with encoded characters for which the
property is irrelevant."

A few pages down, D40 has more information about stability of properties.

I think the rationale is that code points unknown to an application
may well be valid in a newer version of Unicode, so using default
behaviour is most desirable. Notice, Mathias, that every single design
decision you make will be scrutinised. In general it probably makes
sense to explicitly reference the Unicode standard everywhere in your
code and documentation.

Cheers,
Rogier


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk