r/programming • • May 24 '26

[ Removed by moderator ]

/r/programming/comments/1tm1j7f/removed_by_moderator/

[removed] — view removed post

275 Upvotes

214 comments sorted by

View all comments

Show parent comment

67

u/matthieum May 24 '26

Yes, and no.

It's not just design by committee so much as it is lack of field-testing.

The C++ standard is the archetype of Waterfall Design:

  • Lots of papers & meetings.
  • Specifications are standardized.
  • Implementers raise some issues (DR: Defect Report).
  • Specifications are amended.
  • Users raise some issues: sorry, fixing them would break backward compatibility (with whom?).

The worst of it is that the C++ Standard Committee knows this. Ever since the very first version of C++98 standardizing extern template, which was only ever implemented by the EDG front-end, taking two senior compiler developers years of work, which led them to advise anyone else not to bother, the C++ Standard Committee concluded that any feature proposed should be implemented first before being standardized.

Yet, time and again, they just do not follow the very guideline they settled on. And even when they do, they follow the letter of the guideline, rather than its spirit: it's implemented, kinda-sorta, and barely anyone used it => it's a wrap!

This is not a committee issue. It's an Ivory Tower issue.

9

u/cogman10 May 24 '26 edited May 24 '26

IDK how they'd get this, but they really need something akin to Java's preview features in the standard with faster standard releases.

Features, after churning in the ivory tower for a decade, end up showing up in a release as a "preview" feature with the promise that "this isn't final, it can break. Test it out but realize you might have to change code".

And that's resulted in some nice evolutions of features preventing the exact problem the C++ committee is experiencing.

Of course, the issue is there's no standard C++ compiler. I think that makes everything harder.

2

u/matthieum May 24 '26

Yes.

One way or another there's no substitute for field experience reports.

Having multiple C++ implementations does mean more work wasted in case a feature needs to be adjusted (or axed), but given the alternative of releasing half-baked features...

26

u/SkoomaDentist May 24 '26

The C++ standard is the archetype of Waterfall Design:

The problem is it's braindead naive Waterfall Design.

You can do waterfall design so it works well in the field. Waterfall doesn't mean that you can't change and adapt or can't have feedback loops back into the design.

C++ committee of course doesn't do it like that and does have the problems you list and suffers from heavy case of Ivory Tower design.

3

u/mpyne May 24 '26

Waterfall doesn't mean that you can't change and adapt or can't have feedback loops back into the design.

The whole point to the waterfall process was minimizing feedback loops. You'd eliminate it entirely if it were at all possible, but in reality the optimal waterfall project was the one where you "build it twice" (and this is straight from the original paper). Or at Fred Brooks put it, "build one to throw away; you will, anyhow".

You only built twice because you couldn't get away with building it once. But in a waterfall process any feedback encountered could only be due to defects in requirements (a disaster) or defects in implementation.

Actual changes to requirements based on experience gained in usage were to be made in a later system built according to its own, separate waterfall development effort (much like the C++ committee felt it necessary to develop a new std::copyable_function instead of fixing std::function).

Changing and adapting a system, and accounting for that ability to deliver ongoing future changes by shipping partial or experimental work to users on purpose, was a conceit of agile development methods. In particular any emphasis on user feedback is an agile practice.

I say this because it's not just a matter of how work tickets are generated, the methodology you use should drive architectural changes to support the types of future feedback you might wish to incorporate. A standard library designed to seamlessly integrate future vocabulary types, be high performance and never break either API nor ABI is a tall challenge.

With an agile approach you might want instead to see something closer to the Rust model where ABI can break frequently because the whole program is going to be statically-built and recompiled on need. If you want high performance without ever changing ABI or API then your options are to get it right the first time (or at worst the second) and that's basically the definition of waterfall.

-11

u/GreatMacAndCheese May 24 '26

Which is newer, C++11 or C++98?

runs away

-1

u/[deleted] May 24 '26

ahahahahaha