Boost logo

Boost :

Subject: Re: [boost] [http] Design ideas for a request router
From: Vinícius dos Santos Oliveira (vini.ipsmaker_at_[hidden])
Date: 2016-03-21 16:49:32


2016-03-20 19:06 GMT-03:00 Uisleandro <uisleandro_at_[hidden]>:

> 4. This implementation considers "%i", "%d" and "%f" as the same, which
> means that they will be placed in group,
>

I don't like the use of printf-style formatters.

For one, you have to learn these letter and they're useless anyway (C++ has
the necessary machinery to detect the used type).

Another reason to avoid them is the
easy-to-misuse/lack-of-planned-extensibility/unsafety they tend to acquire
as they evolve. Besides the type, you might need formatting options and
using printf this is text you put between the '%' sign and the type letter.
Expressions start to get long and confuse and it's hard to tell when they
end. It's way easier to use something like Python's {} where you know where
are the beginning/end points (even if you have several formatting options).

Another issue is localization, but it may be less important in this domain.
Printf style formatting doesn't allow you to reorder arguments, which is
very important in localization where different languages may use the
arguments in different order.

-- 
Vinícius dos Santos Oliveira
https://vinipsmaker.github.io/

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