Re:Should we stop writing functions? (C++)
by memefrog on Monday August 07, 2023 @06:01AM
(#37032422)
>The language is literally designed
I think that is a matter of some debate.
Re:Should we stop writing functions? (C++)
by hnfong on Tuesday August 08, 2023 @12:13AM
(#37044440)
This isn't even debatable.
>> Efficiency has been a major design goal for C++ from the beginning, also the principle of “zero overhead” for any feature that is not used in a program. It has been a guiding principle from the earliest days of C++ that “you don’t pay for what you don’t use”.
C++ is generally used by millions of people to whom execution time matters quite a bit. The language is literally designed to force the programmer to decide how to balance CPU cycles with language abstractions and features. It's already hard to debug compared with a lot of other languages (which are generally slower).
The fact that you (and GGP) rarely encounter situations where run time is critical is a limitation on your experience, not a universal law that applies everywhere.
So, context is really important here.