Date: Sat, 23 Dec 2023 11:05:35 -0500
On Sat, Dec 23, 2023 at 10:30 AM Wim Leflere via Std-Proposals <
std-proposals_at_[hidden]> wrote:
> Would there be interest in having more idiomatic versions of the character
> check functions (from cctype
> <https://en.cppreference.com/w/cpp/header/cctype> & cwctype
> <https://en.cppreference.com/w/cpp/header/cwctype>)?
>
It sounds like you're basically proposing that there should be
one-argument, as well as two-argument, overloads of
https://en.cppreference.com/w/cpp/locale/islower
where the one-argument overload `std::islower(t)` would mean no more or
less than `std::islower(t, std::locale())`.
"bool std::is_lower(char ch)" and "bool std::is_lower(wchar_t ch)"
>
FYI, you can't land-grab the name `is_lower`; many real-world codebases
define `is_lower` for themselves (even as a macro) precisely because that
name is well-known *not* to be reserved to the implementation. You could,
physically, land-grab `isclower` or `islowerchar` or something. But really,
I don't see why you'd want to avoid the existing name `islower`.
I don't think such a proposal is really worth it. Locales are awful; nobody
likes them. You might have more luck standardizing an "is-lower-case-ASCII"
function — which I suspect has even been proposed before, so you should
also search for that prior proposal and see how and by whom it was shot
down. (I would naturally suspect IBM, with the EBCDIC, in the LEWG.)
HTH,
Arthur
std-proposals_at_[hidden]> wrote:
> Would there be interest in having more idiomatic versions of the character
> check functions (from cctype
> <https://en.cppreference.com/w/cpp/header/cctype> & cwctype
> <https://en.cppreference.com/w/cpp/header/cwctype>)?
>
It sounds like you're basically proposing that there should be
one-argument, as well as two-argument, overloads of
https://en.cppreference.com/w/cpp/locale/islower
where the one-argument overload `std::islower(t)` would mean no more or
less than `std::islower(t, std::locale())`.
"bool std::is_lower(char ch)" and "bool std::is_lower(wchar_t ch)"
>
FYI, you can't land-grab the name `is_lower`; many real-world codebases
define `is_lower` for themselves (even as a macro) precisely because that
name is well-known *not* to be reserved to the implementation. You could,
physically, land-grab `isclower` or `islowerchar` or something. But really,
I don't see why you'd want to avoid the existing name `islower`.
I don't think such a proposal is really worth it. Locales are awful; nobody
likes them. You might have more luck standardizing an "is-lower-case-ASCII"
function — which I suspect has even been proposed before, so you should
also search for that prior proposal and see how and by whom it was shot
down. (I would naturally suspect IBM, with the EBCDIC, in the LEWG.)
HTH,
Arthur
Received on 2023-12-23 16:05:49