3 ms·
It can also mean not overusing libraries, not overabstracting prematurely, seeing if you can simplify the high-level design of the program to not rely on compli
by jstimpfle 4y ago
It can also mean not overusing libraries, not overabstracting prematurely, seeing if you can simplify the high-level design of the program to not rely on complicated compile time magic so much.
There's probably a good balance to using templates where they improve QoL but there's only very little code with those mess of < and > that tend to produce unreadable error messages. But a lot of "modern" C++ I find browsing on the internet way overuses templates IMO.
I could be considered a masochist for still writing plain C, but I find it very convenient just having one compiled (not optimized to death) version of code that is parameterized with runtime parameters (mostly sizes, sometimes alignments, rarely function pointers) in most cases. I find it also better for modularity if the library and container code is type-agnostic. It also builds faster, often much faster. Doesn't work for non-POD C++ classes, of course.
C-Pointers are often all the "generics" I need, sparing me to type out almost all of the repetitive size calculations. And even that (array access) gets rare as the projects grows more and more structure.
- ncmncm 4y agoOften just OK is just OK. And fast builds have enduring appeal. But even masochism can get too comfortable.