News for hackers. Stuff that matters.
Re:The joy of max() by userbinator on Friday March 30, 2018 @08:07PM (#16720823)
C++ has advanced considerably

...and gained considerable complexity in the process. (I'm aware that C has gained some too, but not to the extent of C++.)

Re:The joy of max() by ovao on Friday March 30, 2018 @10:44PM (#16721381)
It's a true statement that C++ has gained considerable complexity since those days, largely due to the C++ committee's very religious approach to compatibility. How that added complexity has influenced how complex C++ applications must be is a discussion with considerably more nuance.
Re:The joy of max() by netheril96 on Saturday March 31, 2018 @02:27AM (#16722047)
C language is simple, and the result is this considerably complex piece of implementation instead.
Re:The joy of max() by mehrdadn on Friday March 30, 2018 @09:10PM (#16721065)
And I'd wager the Linux kernel has become more complex in the past couple decades too. But so what?
Re:The joy of max() by okket on Saturday March 31, 2018 @09:53AM (#16723279)
I'd argue: Yes, this is true. But you need at least on stable part in the toolchain for the kernel to get reliable results. You can't have your hammer transform to a screwdriver just because you swing it in the other direction. And if there is such a tool/case, you need to be absolutely sure how and when it behaves this way, on every possible platform.

This is not the case for evolving C++.

Re:The joy of max() by mehrdadn on Saturday March 31, 2018 @04:01PM (#16724897)
To me this situation is more more like having a screwdriver that can only be screwed with hammers from a particular manufacturer (Linux -> GCC), because that manufacturer is the only one that makes hammers with screw-driving tips that work with that particular screw head (non-portable macros for type-checking or whatever goes on there). You might as well just get a normal screwdriver (C++ compiler) and a normal screw (C++ program) like the rest of the world does -- and there's no implication that you have to keep changing screw tips (-std=c++??) every time Apple (standards committee) decides to come up with a new format (C++17).
Re:The joy of max() by JdeBP on Monday April 02, 2018 @09:34AM (#16734305)
If you are going to argue that, then you need to look again at the headlined item, where it was not the case that it behaved the same on every possible platform. It is a non-standard mechanism of one compiler, that was picked based upon a compromise decision about what versions even of that one compiler it would actually work with.