|
Boost : |
Subject: Re: [boost] [locale] Formal review of Boost.Locale library startstomorrow
From: Artyom (artyomtnk_at_[hidden])
Date: 2011-04-17 10:05:18
----- Original Message ----
> From: Peter Dimov <pdimov_at_[hidden]>
> To: boost_at_[hidden]
> Sent: Sun, April 17, 2011 4:31:16 PM
> Subject: Re: [boost] [locale] Formal review of Boost.Locale library
>startstomorrow
>
> Jeff wrote:
>
> > > Okay, I can buy that in some circumstances, you want syntax errors to be
> > > silently ignored.
>
> No. You are looking at the problem from a programmer perspective,
> but when these errors are introduced, there is no
> programmer present. [snip] This does not "silently ignore" the errors,
> it reports them in an appropriate way, to the appropriate person.
>
> Now, you could make the case that you, as a programmer, should still have
> the error reported to you by the library so that you can log it
> (if the library doesn't have built-in logging support), which of course
> would also allow you to promptly proceed to ignore everything
> that's been said and make the error handlers throw exceptions. :-)
Actually it may be it is better to make boost::locale::format to add something
to formatted message like
cout << format(translate("Hello World {1}")) % param;
The is translate to "bonjour le monde {1" (missed "}"
Would print:
"[syntax error] bonjour le monde {1"
Instead of
"bonjour le monde"
However I'm not sure if it is desired default behavior. But interesting
point to think about.
Artyom
>
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk