Boost logo

Boost :

From: Jeff Garland (jeff_at_[hidden])
Date: 2006-08-29 10:22:58


Paul Giaccone wrote:
> Jeff Garland wrote:
>> ...dropping out of lurk mode for one comment...keeping in mind that I have not
>> looked at the library or read a big chunk of this thread...
>>
>> I/O turns out to be something that is quite difficult to do well. There's
>> plenty of issues like: support for wide streams, support for different domain
>> contexts (eg: sometimes I want it to be 'm' and sometimes 'meters'),
>> internationalization of number format, support for serialization. In
>> date-time, there's probably more effort in I/O than any other single aspect of
>> the library.
>>
> Um, just a thought... can we have a flag for Commonwealth/US spellings,
> so that the user can choose whether to have "metres" and "litres" or
> "meters" and "liters", rather than just assuming every speaks US English
> (_pace_ our American cousins)? Here, "meters" are used for measuring all
> sorts of things, but not length, and are also those things you put coins
> in when you park... Recall that allowing the spellings "meter" and
> "liter" was a concession made to the US (and some other countries where
> this spelling is used), and so this spelling is a permitted variant, not
> the standard spelling. Likewise for "deca-" versus "deka-", should this
> prefix be part of the library.

Right, that's one aspect I didn't mention. The analogy with date_time is you
have to be able to replace all the month names (Jan, Feb, etc) and day of the
week strings (Sun, Mon, ...). Basically, the user needs to be able to replace
these strings without rewriting the streaming operators. This requires a
custom i/o facet and streaming operators that use it. And then you need
manipulators to setup the stream to easily select short versus long strings.
As I said, it's quite involved and requires more knowledge of i/o streams than
most developers aspire to.

> Perhaps this can be done as part of the L10n of the library.

I doubt it, the facet interface is tied to the unit types supported by the
library.

Jeff


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