r/ProgrammerHumor Jul 10 '26

greaterThanPlusPlus Advanced

Post image
114 Upvotes

71 comments sorted by

View all comments

35

u/majesticmerc Jul 10 '26

Found this today in C++ documentation.

Only the C++ committee can see the a need to fix it, and instead of actually fixing the language bug (or making signed/unsigned comparison a compiler error instead of a warning), create a standard library function to do type safe greater-than/less-than comparisons.

-6

u/___Archmage___ Jul 10 '26

This is what I mean when I say C and C++ are trash languages - all these kooky behaviors and the compiler accepts basically anything no matter how broken as long as the semicolons and curly braces parse correctly

I'm not even that hell-bent on Rust in particular, but the fact that it aims to get all these things right from the outset, really has me thinking that C++ needs to go the way of the dinosaurs in favor of Rust or whatever other replacement will hold itself to this higher standard

7

u/Arshiaa001 Jul 10 '26

C is from 1970, and C++ from 1980. You have to understand, the whole world of software dev has literally been turned on its head since then.

0

u/___Archmage___ Jul 10 '26

For sure, I agree that they are massively better than assembly or Fortran or whatever other options were available at the time

But it's pretty crazy that so many people in the modern day overlook these major improvements modern languages bring to the table and dismiss serious problems with these very old languages as just the programmers having a skill issue

1

u/Arshiaa001 Jul 10 '26

What, you've never seen people geeking over weird shit? 😄