Sujet : Re: about some potentially interesting unicode operators
De : janis_papanagnou+ng (at) *nospam* hotmail.com (Janis Papanagnou)
Groupes : comp.lang.cDate : 29. Aug 2024, 02:36:57
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vaojbq$3mepa$1@dont-email.me>
References : 1 2 3
User-Agent : Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0
On 29.08.2024 01:13, Lawrence D'Oliveiro wrote:
Fun fact: Python’s operator precedence rules differ from C’s ones in one
subtle little way, that actually reduces the need for parentheses in real-
world code.
It's the bit-operations (&, ^, |), I suppose? <lookup> Yes!
Python did the right thing (here).
While Python and C++ let you define new overloads for standard operators,
very few languages allow you to define entirely new operators. Algol 68
did (from a limited character set).
Redefining priorities of operators in Algol 68 (a rarely found
feature) might be surprising to the unaware, though.
Janis