|
Boost : |
From: Ivan Matek (libbooze_at_[hidden])
Date: 2024-12-19 09:16:11
On Wed, Dec 18, 2024 at 2:20â¯PM Janko Dedic <jankodedic2_at_[hidden]> wrote:
> Just my two cents on the topic, to hopefully frame the discussion in the
> proper way.
>
To repeat what I said: I am *not *saying UFCS should be adopted to C++.
I just use Herb's proposal for summary of why it is nicer for users to use
member functions than free functions. Example you provided of "symmetric"
operation like std::max certainly look more natural in free function style.
btw Herb's proposal does not make starts_with(string, prefix) work, it is
only 1 direction, you can check section 3.2.3
Speaking of Herb's proposal and original discussion of free function vs
member function 3.2.2 section also seems relevant(not for your comment, but
in general).
Q: Wait, isnât std::begin/end/size a counterexample, evidence fa-
> voring non-member function call syntax being UFCS?
> A: No.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk