3 ms·
I thought there were calls to simplify C++? This feels like the opposite direction. I've programmed in C++ for >20 years now and I can't think of a single momen
by xorvoid 3y ago
I thought there were calls to simplify C++? This feels like the opposite direction. I've programmed in C++ for >20 years now and I can't think of a single moment where I would have wanted this feature.
- mempko 3y agoThink about your own life. Does a toilet simplify your life? When you need to go to the bathroom, it seems much better to go to the toilet than say outside during the cold having to dig a hole in dirt every time and bury it. Yet toilets and plumbing add engineering and sophistication to your house. This is the paradox. Simple languages push complexity to the user. Complex languages on the other hand simplify the user's tasks.
- KerrAvon 3y agoHas to be the right sort of complexity, though, or it makes the user's tasks worse over the long term. Every C++ project is already a dialect unto itself and this proposal would very much not help the situation.
- mempko 3y agoI've been doing C++ since the 98 standard and C++ today is far easier, faster, more productive than anytime in the past. My code often feels as simple as python but much faster. Especially now that there are libraries using more modern standards.
- shrimp_emoji 3y agoI've only been doing C++ since the 2011 standard, but my sense of the language's evolution over time sort of matches yours. If you bother to learn the most complex, least-obvious, newest way to do something, the language has gotten safer, more functional, and more powerful. You're way more productive using the container-agnostic `std::find()` than rolling your own version of it, as you might in other languages. BUT I wouldn't say simpler. Do you slather `noexcept` on every method you write and turn every `const` to `constexpr`? :p Some advocate for that, and the have-a-new-keyword-for-something-that-should-actually-be-the-default-(but-of-course-the-defaults-will-never-not-be-backwards-here-because-we-got-them-wrong-way-back-and-too-much-existing-code-will-break-if-we-change-them) game is getting a little crazy for me.
- swingingFlyFish 3y ago"Complex languages on the other hand simplify the user's tasks." You have an example? Cause I don't see how this is true.
- pjmlp 3y agoSupporting generics from the get go instead of using code generation pre-processors.
- shrimp_emoji 3y ago> Simple languages push complexity to the user. Complex languages on the other hand simplify the user's tasks. I don't think this captures the uniquely awful combination of "object oriented" + "low level (manual memory management)" that C++ chose. I think that's the most inherently complex dyad of traits you can choose for a programming language, and I think it's why C++ is the most complex programming language that's ever existed. They even tried hiding the complexity in shame with implicit behavior, like the compiler synthesizing the "rule of 5" functions for you, meaning you have to go out of your way and mark them as "deleted" to tell it not to do that when you know it'll do it wrong and leak memory and you have to memorize what the "rule of 5" is. (The only other language I can think of that went down the same route is D, but I don't know how complex it is in comparison to other languages. Maybe Walter Bright can argue it's a counterexample to my argument cause it's waaay simpler than C++. But then I'll counter-counter argue that it has garbage collection. But then again that's optional. My brain hurts.)
- pjmlp 3y agoThat is C++'s fame, and it is indeed quite complex. However people that assert that, usually never went through PL/I, ALGOL 68, Ada, Common Lisp standards, nor have realized how JVM/Java, CLR/C#, Python/StdLib have changed during the circa 30 years of their existence.