[RFC v3 2/4] string: Add streq,memeq,wcseq,wmemeq,strcaseeq[_l],wcscaseeq[_l] APIs

Alejandro Colomar alx@kernel.org
Wed Sep 3 11:42:00 GMT 2025


Hi Adhemerval,

On Wed, Sep 03, 2025 at 08:26:12AM -0300, Adhemerval Zanella Netto wrote:
> > Joseph and I voted to standardize it, but for some reason, there are
> > people in the committee opposed to it, with reasons such as being
> > worried that it would be inconsistent that programs could use sometimes
> > strcmp(3) (mainly in old code) and sometimes streq() (in newly written
> > code).
> 
> I agree that we should wait for standardization,

You do understand this means waiting forever, right?

> and Joseph was clear that
> an implementation is not strictly required to move this proposal forward [1].

An implementation is not required, but good luck convincing the
committee on anything that doesn't have flashy lights.  They're all in
for introducing new language features that come from trendy languages,
but the real stuff that people use in projects?  No, that's not going
to happen soon.

Named loops?  Yeah, who cares if we have goto or if it results in
inconsistent rules for label lookup.

z suffix for size_t?  Yeah, who cares if suffixes are not often used,
and cause programs to be less safe (due to unsigned arithmetic not
having the same diagnostics.

streq(), which is widely used, either by the exact name or by some
pproject name such as strings_equal()?  No, it's too tiny of a feature
for them to be interested in.

On the other hand, if implementations start adding it, you'll possibly
get some more votes, and maybe be able to standardize it.


Have a lovely day!
Alex

-- 
<https://www.alejandro-colomar.es>
Use port 80 (that is, <...:80/>).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/libc-alpha/attachments/20250903/99912389/attachment.sig>


More information about the Libc-alpha mailing list