You can just use features of C++ which improve the ergonomics of C; it's not necessary to buy into modern C++ wholesale. If you want to write a C program but with generic container types, just use the features of C++ which facilitate that.
> And the ergonomics of modern C++ look absolutely horrid compared to actual modern languages.
True, but if you want to write "C as it is, with some niceties", then you're not talking about modern languages.
Re:Modern C, Second Edition
by humanrebar on Thursday September 19, 2019 @09:27AM
(#21015926)
How is it a massive cognitive load? Use clang libraries and error out if there are any operator declarations, for instance.
Re:Modern C, Second Edition
by AndrewGaspar on Thursday September 19, 2019 @02:07PM
(#21018855)
"How is it a massive cognitive load? Just write a bunch of tooling to enforce your rules!"
Re:Modern C, Second Edition
by humanrebar on Thursday September 19, 2019 @11:54PM
(#21023214)
It's simpler than the tutorial example for python-clang. It's strictly less work than a responsible unit test suite, and there's not much downside to getting some details wrong on this particular application.
Re:Modern C, Second Edition
by heinrich5991 on Tuesday September 24, 2019 @04:57AM
(#21057896)
>tutorial example for python-clang
Do you have a link? Your comment is the highest Google result for that quote.
And the ergonomics of modern C++ look absolutely horrid compared to actual modern languages.