Sujet : Re: Interval Comparisons
De : thiago.adams (at) *nospam* gmail.com (Thiago Adams)
Groupes : comp.lang.cDate : 04. Jun 2024, 12:32:52
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <v3mu14$dhe9$1@dont-email.me>
References : 1
User-Agent : Mozilla Thunderbird
On 04/06/2024 04:14, Lawrence D'Oliveiro wrote:
Would it break backward compatibility for C to add a feature like this
from Python? Namely, the ability to check if a value lies in an interval:
def valid_char(c) :
"is integer c the code for a valid Unicode character." \
" This excludes surrogates."
return \
(
0 <= c <= 0x10FFFF
and
not (0xD800 <= c < 0xE000)
)
#end valid_char
See Chaining Comparisons
https://www.open-std.org/JTC1/SC22/WG21/docs/papers/2018/p0893r0.htmlhttps://medium.com/@barryrevzin/chaining-comparisons-seeking-information-from-the-audience-abec909a1366I don't know what are the current status of this proposal.