I've never used the alternative long-form bit-arithmetic names and_eq, or_eq and xor_eq in C++, and it just occurred to me that they are named wrong. They are alternative spellings for bit-arithmetic assignment operators &=, |= and ^=. Assignment, not equality.
I don't really think that this causes any problem, but it's curious, isn't it? Naming is hard.
=> More informations about this toot | More toots from rollbear@fosstodon.org
@rollbear I'm sure the 'eq' in this case refers to the '=' sign part that the text replaces. Which is still wrong, because as every child (hopefully) learns in school, equality is written with two == (or is it not)?
The blessings of working with a historic language...
=> More informations about this toot | More toots from asperamanca@mastodon.social
@asperamanca Oh, I'm absolutely sure that this is the case. I just thought it was interesting when I realized what it was I saw.
=> More informations about this toot | More toots from rollbear@fosstodon.org
@rollbear well, it was either this or xor_ass...
=> More informations about this toot | More toots from tmr232@mastodon.social
@rollbear
While I get why some folks advocate for them I think folks in the C and C++ world have been using these symbols for sooo long trying to get folks to use the alternatives is bad b/c most folks will be confused which makes for worse maintainability.
For fun: https://hachyderm.io/@shafik/112709118367135136
and also remember these came from charset incompatibilities, not for readability: https://hachyderm.io/@shafik/112709272611824263
=> More informations about this toot | More toots from shafik@hachyderm.io
@shafik When I was in university (early 90s) it was common for terminals to support US-ASCII, or some national adaptation. The latter usually sacrificed "exotic" characters like "{|}[]" to gain the needed extra letters of the alphabet ("åöåÄÖÅ") (in the wrong order for sorting!).
So, I learned to program with "while (expr) ä, objÄöÅ..." and also to read e-mail like"n}gra |vriga saker borde vi {nd} {nddra p}".
=> More informations about this toot | More toots from rollbear@fosstodon.org
@shafik Hmm, related. For a very long time, my standard sign-off for email was as depicted below.
Which in a fixed width font looks almost right. The underscore over the "o" is not uncommon as a replacement of the dots over "ö" in handwriting.
=> More informations about this toot | More toots from rollbear@fosstodon.org
@rollbear @shafik I still remember that Epson FX80 dot matrix printer from the 70s. You could flip dip switches to select a national language character set: {|}[] and 5Fh became äöüÄÖÜß in German.
Most of these characters from ASCII are hard to type on non-US keyboards, put a lot of strain to your fingers, and can oftentimes typed only with two hands (like e.g. the [ )
This is one of the reasons why I hate some of the syntax choices in C or C++ : it neglects or dismisses most of the world.
=> More informations about this toot | More toots from DanielaKEngert@hachyderm.io
@DanielaKEngert@hachyderm Becoming used to English keyboards isn't that hard. Takes only sime days.
=> More informations about this toot | More toots from wosrediinanatour@mastodon.social This content has been proxied by September (3851b).Proxy Information
text/gemini