Hacker News new | ask | show | jobs
by fsloth 652 days ago
I’ve been writing C++ over 20 years. The language is a freak show, combining the solid industrial tooling and userbase, with some development efforts led by a clown-car full of pretentious academics and people who just want to bolt on new stuff for no good reason except to ”keep the language fresh”.

C++ is not supposed to be fresh. It’s supposed to be portable, and allow fine tuning of programs to bare metal while allowing a sort of high level implementation of API:s (but often fragile and badly designed).

Some new features are excellent, others are not, and the history is plagued with weird historical feature gaps obvious to anyone familiar at all with more consistent languages.

So if something feels weird, there is always a good chance it’s not you, it’s the language (committee).

2 comments

C++ certainly suffers from somewhat of a kitchen-sink nature. However, if you consider two of its design goals being:

* Support for multiple, different, programming paradigms.

* Very strong backwards compatibility, all the way back to C.

... then some "freakness" is to be expected. And I do believe some of the additions (to the library and the languages) have been excessive. However, I disagree with your characterization of language development work.

1. Most people on the committee, AFAICT, are from industry rather than academia. And if you consider national bodies, I think the ratio is even higher.

2. "Keeping the language fresh" is not a goal and not what the committee does. Most of what's added to the language are things that people have been complaining about the lack of for _decades_.

3. Feature proponents are those who want to "bolt on new stuff". Committee members are tasked with preventing new stuff being just bolted on.

4. Some new additions are necessary, and others are not necessary but useful, for "tuning programs to bare metal".

Finally - I agree that committee-work has the drawback of less consistency; and there are definitely warts. But for an established language with huge existing codebases and many stake-holders, and with the design goals I mentioned above in mind - an international committee and consensus-building is better than appointing some benevolent dictator.

> Most of what's added to the language are things that people have been complaining about the lack of for _decades_.

And are useless now, because everybody who had that problem either already solved it (the solution could have been "use another language") or did realise that it is not worth the hassle. I guess the best examples are `std::format` or `std::thread`.

> But for an established language with huge existing codebases and many stake-holders, and with the design goals I mentioned above in mind - an international committee and consensus-building is better than appointing some benevolent dictator.

That depends, but yes, everything is better than letting Stroustroup "decide".

I was not critizing the governance model.
I don’t think the committee / proposals process is necessarily bad. It is a good way to develop a formal specification for a portable and highly complex language with many pitfalls and serious, industrial-level legacy compatibility requirements.

It might be better if it had a true BDFL, instead of a spiritual guide, and I do worry about the committee getting too far ahead of the industry and leaving it behind, plus what will happen when Stroustrup finally retires in earnest.

But yeah, now and then it does produce a turd, and there’s only so much turd-polishing you can really do.

I guess I’m just saying it’s a development model with pros and cons. The pros are necessary. The associated cons are inevitable.

To be specific I was not critizing or promoting any particular governance or design model. Just that this particular authority has had it’s more dysfunctional moments in it’s output - one should not presume all features of C++ are splendid examples of software design.
there are definitely some total stinkers.
Any language under ISO doesn't have any spiritual guide, that role is gone the moment ISO takes over.

Everyone has one vote, and everything turns around politics to win mini-elections per feature evolution stage.