Boost logo

Boost :

From: Дмитрий Архипов (grisumbras_at_[hidden])
Date: 2022-08-22 13:14:37


This is my review of Boost.Url.

Disclaimer I am employed by The C++ Alliance, that is by Vinnie. Nevertheless,
I haven't followed development of this library closely, so I did not have much
prior knowledge about design choices it makes.

My vote is to ACCEPT the library, since it does solve the use cases for URLs
that I currently can come up with, it is quite easy to use (and not too easy
to use incorrectly) and the flaws that it has doesn't seem to be fundamental.

> What is your evaluation of the design?

Overall, I found the API fairly easy to use. I understand the concern about
parsing into a view type, but I consider it a lesser evil than allocating on
every parse or creating two kinds of functions, one that allocates and one that
doesn't.

I did also find the naming situation for encoded/decoded a bit confusing. In
particular, url::path returns pct_encoded_view, but url::encoded_path returns
string_view. I would expect the opposite. Maybe this needs additional
explanation in the docs?

Finally, I find the use of system::result as the sole method of reporting
errors intriguing. I have not yet encountered a library that uses this
approach, and I have been thinking about employing it myself in the past. If
this library is accepted, it will become a great experiment for this sort of
API and will provide us with the experience on whether it's a good replacement
for dual APIs using error_code.

> What is your evaluation of the implementation?

I haven't looked into that.

> What is your evaluation of the documentation?

Documentation seems sparse but ultimately I have been able to successfully
find all the information that I needed. Still, a lot more examples and detailed
explanations are necessary.

> What is your evaluation of the potential usefulness of the library?

The obvious application is networking, but given that URIs were designed as a
universal way to identify entities, there are other potential use cases.

> Did you try to use the library? With what compiler? Did you have any problems?

I have implemented a very simple program that constructed URLs (including ones
with custom schemes), compared them against each other, and deconstructed them
for "routing". b2 was used as the build system and GCC 10.3 as the
compiler. I did not encounter any problems.

> How much effort did you put into your evaluation? A glance? A quick reading? In-depth study?

3 hours of coding and 2 hours of reading documentation.

> Are you knowledgeable about the problem domain?

I'm not an expert, but I have been dealing with URLs in Python and in C++ using
Qt's QUrl.

сб, 13 авг. 2022 г. в 05:30, Klemens Morgenstern via Boost
<boost_at_[hidden]>:
>
> Hi all,
>
> the formal boost review of the boost.url library starts today, the 13th of
> August and will last until and including the 22nd of this month.
>
> The library has been developed by Vinnie Falco and Alan de Freitas.
> The master branch is frozen during the review and can be found here:
> https://github.com/CPPAlliance/url
>
> The current documentation can be found here: https://master.url.cpp.al/
>
> Boost.URL is a portable C++ library which provides containers and
> algorithms which model a "URL" and understands the various grammars related
> to URLs and provides for validating and parsing of strings, manipulation of
> URL strings, and algorithms operating on URLs such as normalization and
> resolution.
>
> Please explicitly state that you either *accept* or *reject* the inclusion
> of this library into boost.
> Also please indicate the time & effort spent on the evaluation and give the
> reasons for your decision.
>
> Some questions to consider:
>
> - Does this library bring real benefit to C++ developers for real world
> use-case?
> - Do you have an application for this library?
> - Does the API match with current best practices?
> - Is the documentation helpful and clear?
> - Did you try to use it? What problems or surprises did you encounter?
> - What is your evaluation of the implementation?
>
> More information about the Boost Formal Review Process can be found
> at: http://www.boost.org/community/reviews.html
>
> The review is open to anyone who is prepared to put in the work of
> evaluating and reviewing the library. Prior experience in contributing to
> Boost reviews is not a requirement.
>
> Reviews can also be submitted privately to me, and I will not disclose who
> sent them.
> I might however cite passages from those reviews in my conclusion.
>
> Thanks to Vinnie & Alan for providing us with a new library & thanks for
> all the reviews in advance.
>
> Klemens
>
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost


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