Deutsch English Français Italiano |
<v3mu14$dhe9$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!3.eu.feeder.erje.net!feeder.erje.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Thiago Adams <thiago.adams@gmail.com> Newsgroups: comp.lang.c Subject: Re: Interval Comparisons Date: Tue, 4 Jun 2024 08:32:52 -0300 Organization: A noiseless patient Spider Lines: 24 Message-ID: <v3mu14$dhe9$1@dont-email.me> References: <v3merq$b1uj$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Tue, 04 Jun 2024 13:32:53 +0200 (CEST) Injection-Info: dont-email.me; posting-host="7eb42b8b67978955cd8096730bd57e1a"; logging-data="443849"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/F5ap+yIUwvqA5ZXjlcwTJH4ohjD2QSqM=" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:lShas2a9ZdUAm9OaEakpV7s27Ho= In-Reply-To: <v3merq$b1uj$1@dont-email.me> Content-Language: en-US Bytes: 1811 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.html https://medium.com/@barryrevzin/chaining-comparisons-seeking-information-from-the-audience-abec909a1366 I don't know what are the current status of this proposal.