Re:Care is needed to use C++ std:optional with non-trivial o...
by jay-barronville on Friday January 13, 2023 @09:58AM
(#34368569)
What a false equivalence. I don’t understand the need to pretend like C++ isn’t a minefield of complexity (especially compared to C). I don’t hate the language and C++ programmers tend to be some of the smartest programmers I know/encounter, but can we please not be deliberately obtuse here?
[ Parent
| on HN ]
Re:Care is needed to use C++ std:optional with non-trivial o...
by kllrnohj on Friday January 13, 2023 @10:10AM
(#34368765)
C is a minefield of complexity, though, why are you so desperate to pretend it isn't? The reality is that much of the language complexity of things like C++ or Rust is because the problem space is actually complex. C's language just doesn't help you with the inherent complexity. In fact it actively encourages bugs as a result. That's not a simple language, it's a bad one. It was fine for the constraints of the time, but it's not anymore.
C is easily the least defensible language choice of the commonly used languages. There's so many just obscenely better options it's not even funny. See also why even "intentionally C-like" languages like Zig are growing increasing complexity https://github.com/ziglang/zig/issues/7769 Or why things like D's betterC adds all the same "objectionable" stuff C++ does - RAII, operator overloading, etc...
Re:Care is needed to use C++ std:optional with non-trivial o...
by kadoban on Friday January 13, 2023 @11:41AM
(#34370248)
> I don’t understand the need to pretend like C++ isn’t a minefield of complexity (especially compared to C).
C++ is a minefield. So is C though. Comparatively they're pretty much in the same boat for me. Sorry I guess?