News for hackers. Stuff that matters.
Re:Python, unlike C, has the mod operator always return a po... by charcircuit on Wednesday December 29, 2021 @05:23PM (#29730864)
I think there is the same problem with the conditional operator "?" which a ton of resources name as the ternary operator.

edit: tertiary -> ternary

Re:Python, unlike C, has the mod operator always return a po... by eesmith on Wednesday December 29, 2021 @05:26PM (#29730898)
I know it as "the ternary operator" (used that way in K&R at https://archive.org/details/TheCProgrammingLanguageFirstEdit...), and until about 2 minutes ago had never heard it as "the conditional operator" - even though that's how the spec describes it!
Re:Python, unlike C, has the mod operator always return a po... by tialaramex on Wednesday December 29, 2021 @07:03PM (#29731779)
It gets named "the ternary operator" in many languages like C because they only have one ternary operator, it's always that one. In some (I think?) languages there are several ternary operators, and so for them it'd be like if we called C's XOR operator ^ "the binary operator".
Re:Python, unlike C, has the mod operator always return a po... by jholman on Thursday December 30, 2021 @06:39AM (#29735909)
Yeah. It's "the ternary operator" the way John Carmack is "the author of the tweet we're discussing". It's a correct description, but it's not his name.
Re:Python, unlike C, has the mod operator always return a po... by tialaramex on Thursday December 30, 2021 @08:00AM (#29736351)
Names are just whatever you call something. For inanimate objects the objects can't care what you call them, so at the very most you're privileging one person's opinion over another if you choose to call it the same thing. For ideas even more so. Ordinarily the most important purpose of the name is to ensure you're talking about the same thing.

Calling it "Ayers Rock" privileges some guy from the 19th century, calling it "Uluru" privileges a bunch of people who lived near it for longer than that, the rock itself has no opinion (and also doesn't believe anything about ritual magic, property law, gender based taboos, or the tourist industry)

Now, John Carmack is a little different because John is a person and it is rude to use names people don't like. But it isn't impossible, it's just rude. Calling the previous President of the United States of America "Tangerine Palpatine" works just fine - we both know who I meant. In fact it's a little weird that our culture has parents assign to their children full legal names, only kinda-sorta making it possible for them to choose for themselves later, the Culture's habit of allowing children to pick one of their names as part of growing up seems better.