Boost logo

Boost :

Subject: Re: [boost] [locale] Formal review of Boost.Locale library starts tomorrow
From: Artyom (artyomtnk_at_[hidden])
Date: 2011-04-17 05:07:57


> > "{1,numb}" instead of {1,num} or {1,number}
> >
> > If boost.format throws it may accidentally stop
> > the program and both translator and programmer
> > would give very hard times to understand what
> > is going.
> >
>
> Okay, I can buy that in some circumstances, you want syntax errors to be
> silently ignored. This appears to be mostly because the allowable syntax
> can vary with the runtime locale;
> is that correct? (I've only skimmed the
> first few pages of the documentation so I should probably go through it more
> thoroughly. I was completely unfamiliar with localization until this review
> came up.)
>

Not, it is mostly because we don't want that translator
would screw the program accidentally.

> So by no means the formatting string should cause
> > an exception, it may cause invalid output that
> > the translator would see and fix but not abort
> > the entire program.
> >
>
> Based on your knowledge and experience in this domain, I take it at your
> word that swallowing syntax errors is the typical use case. But I'm
> skeptical that this use case is the only relevant one for all users all the
> time. You haven't given any argument against simply opening up the
> interface to allow the user to specify the error behavior, with the default
> being to swallow the error. To me, this wouldn't change the typical use
> case, and, on the implementation side, I wouldn't expect it to be
> technically challenging.
>

I'll think about it, may be it is good idea to add throw on syntax
error behavior even thou it is really not desired.

> I do appreciate you taking the time to bear with me and to explain to me in
> detail your rationale.
>
> - Jeff

Best,
  Artyom


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