-

@ mleku
2025-03-10 20:29:19
i'm violently allergic to anything that requires manual replication of text that must be kept in sync in two separate parts of my project, i do everything i can to avoid it at all times, i am obsessively DRY and it's just not ok
the reason being that the number of bugs i have had due to copypasta code, and that's also why if i find myself repeating something, it gets wrapped into a new function and shared between the upstream users of this same routine
the preprocessor could be harvesting the function signatures but it's complicated to implement that in C because of its ass-backwards function signature format, and the excessive reliance on the preprocessor at all, is another big problem because the process requires the spewing out of generated code, which is then compiled, and those header files are required in order to find the symbols in the linking table to the compiled object files
Go just eliminates all that footsies by making a single site of the definition, by using linebreak/sentinel top level structuring for all exported symbols so the programmer doesn't have to explicitly point the linker to these references, the symbol tables are assembled automatically