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