Ancestors

Toot

Written by Björn Fahller on 2024-12-27 at 12:24

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

Descendants

Written by Robert on 2024-12-27 at 12:49

@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

Written by Björn Fahller on 2024-12-27 at 14:26

@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

Written by Tamir Bahar on 2024-12-27 at 14:59

@rollbear well, it was either this or xor_ass...

=> More informations about this toot | More toots from tmr232@mastodon.social

Written by Shafik Yaghmour on 2024-12-27 at 19:15

@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

Written by Björn Fahller on 2024-12-28 at 22:50

@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

Written by Björn Fahller on 2024-12-28 at 23:53

@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.

=> View attached media

=> More informations about this toot | More toots from rollbear@fosstodon.org

Written by Dani (:cxx: modules addict) on 2024-12-29 at 06:11

@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

Written by Florian Xaver on 2024-12-29 at 10:44

@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

Proxy Information
Original URL
gemini://mastogem.picasoft.net/thread/113724768281415590
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
387.093873 milliseconds
Gemini-to-HTML Time
2.065294 milliseconds

This content has been proxied by September (3851b).