133

I can’t believe nobody has done this list yet. I mean, there is one about names, one about time and many others on other topics, but not one about languages yet (except one honorable mention that comes close). So, here’s my attempt to list all the misconceptions and prejudices I’ve come across in the course of my long and illustrious career in software localisation and language technology. Enjoy – and send me your own ones!

you are viewing a single comment's thread
view the rest of the comments
[-] MyNameIsRichard@lemmy.ml 6 points 1 month ago* (last edited 1 month ago)

Every language has words for yes and no.

Assuming yes and no means true and false, c has numbers (1, 0) for yes and no and c++ can use those numbers for yes and no because it is a superset of c.

Technically, it's 0 and non-0 but I always use 1. They are integers rather than keywords.

[-] PumaStoleMyBluff@lemmy.world 6 points 1 month ago

The article is not about programming languages 🫠

[-] hddsx@lemmy.ca 1 points 1 month ago* (last edited 1 month ago)

Technically, 0 is false and anything else is true. !0 is 1, though, IIRC

[-] crestwave@lemmy.world 13 points 1 month ago

As far as C goes, 1 is true and 0 is false.

In terms of POSIX exit codes, 0 is success and 1 is error.

[-] duckythescientist@sh.itjust.works 5 points 1 month ago

I think more specifically for C, 0 is false and anything nonzero is true. Idk about NaN/inf.

[-] atzanteol@sh.itjust.works 4 points 1 month ago

True is anything other than zero in C.

[-] SpaceNoodle@lemmy.world 3 points 1 month ago
[-] NostraDavid@programming.dev 2 points 1 month ago

Until you use exit codes, which flips the logic.

[-] hddsx@lemmy.ca 1 points 1 month ago

Jesus. I mistyped that horrendously to make a point about !0

I read my comment just now waking up and went wtf

[-] MyNameIsRichard@lemmy.ml 2 points 1 month ago* (last edited 1 month ago)

~~That's what I meant so I've edited my comment to hopefully make that a bit clearer.~~ Having actually tested it, because in C++ I use true/false, it is 0 that equals false and anything else is true. You'll have to forgive my lack of clarity. It's 03:02 and I've had about 2 hours sleep tonight and won't be getting any more. Time for a coffee.

this post was submitted on 06 Mar 2025
133 points (100.0% liked)

Programming

19728 readers
67 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 2 years ago
MODERATORS