Re:C++ coroutines: Initial implementation pushed to master
by EliRivers on Sunday January 19, 2020 @06:20AM
(#22090793)
In my experience, the majority of C that is used is actually by people who think they're working in C++, because they were taught to use manual memory management, raw pointers and other such C-like constructs. Some keywords about classes were thrown in towards the end of "C++ 101" or whatever they learned from, and away they go, writing C with classes like the last 30 something years never happened.
[ Parent
| on HN ]
Re:C++ coroutines: Initial implementation pushed to master
by jefftk on Sunday January 19, 2020 @07:52AM
(#22091176)
That's still C++, just not modern C++.
Re:C++ coroutines: Initial implementation pushed to master
by EliRivers on Sunday January 19, 2020 @10:12AM
(#22091806)
Technically, in that the C++ spec allows it, yes, it's C++. However, I find such definitions to be of little practical use, although frequently in the workplace I sit and wait while someone satisfies their need to carefully divide the world up into precise, clear, exacting and useless definitions before we can get on with doing something useful - the industry just seems to attract that; often they don't care about trashing all those lines immediately afterwards, so long as everyone acknowledged the lines. That said, the discussion about how many layers there are in a model of networking and what they're named rendered some people unable to do anything for the rest of the day.
Colloquially and practically, I might suggest that it demonstrates that the programmer may be dangerously thinking in C with little lumps of data as their classes. The programmer is thinking and coding in C, with some classes, that they then feed to a C++ compiler.
People were doing it like that back in the nineties, when what we think of as "modern C++" didn't exist.