
On Wed, Dec 18, 2024 at 2:20 PM Janko Dedic
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.