3 ms·
C++ makes writing simple code easier than C. It also makes writing big old messes easier than C. Writing simple, elegant and efficient code is hard. It takes
by nly 3y ago
C++ makes writing simple code easier than C.
It also makes writing big old messes easier than C.
Writing simple, elegant and efficient code is hard. It takes "polish", which usually means not stopping the moment as you have "something that works", going back, refactoring, shaking out those TODO comments...questioning all the assumptions and abstractions you added earlier, etc etc.
- sylware 3y agoI severely disagree, the technical cost of the c++ syntax is beyond anything reasonable. That reason alone is enough to avoid its usage: It is less worse to write and try to keep sane plain and simple C, that to be dependent on a c++ compiler, not to mention that c++ code is no more immune from toxic code than C. Actually, this is the other way around: since the syntax is beyond-reasonable complex, c++ toxic code is way worse than c toxic code. C is a lesser evil than c++.
- JohnFen 3y agoI tend to agree. This wasn't always true, but C++ has grown into a bit of a monster.
- c_crank 3y agoWhat is idiomatic, simple C++ code? Each standard seems to redefine what that looks like.