4 ms·
Yeah, let's use copy & paste and C preprocessor macros as our abstraction tools ... Avoiding unnecessary abstractions is important but at the same time those a
by moonchrome 11y ago
Yeah, let's use copy & paste and C preprocessor macros as our abstraction tools ...
Avoiding unnecessary abstractions is important but at the same time those abstractions were invented for a reason. Basically the Go vs generics debate, except even more rudimentary. It's fine if your code doesn't need those abstractions, it sucks badly if it does (eg. gobject)
- comex 11y agoDepends on your definition of rudimentary. The C preprocessor sucks in general, but you can use it to implement all sorts of abstractions Go basically isn't capable of.
- moonchrome 11y agoIf replacing standard high level programming concepts like generics/templates with C macros is your idea of a productive programming environment than I don't know what to say. Just look at any C collection library for things like maps compared to C++.