3 ms·
Long ago I discovered that people don't get emotionally invested in your little perf- or platform-specific hacks if they don't have to look at them. With funct
by hinkley 5y ago
Long ago I discovered that people don't get emotionally invested in your little perf- or platform-specific hacks if they don't have to look at them.
With function inlining, you can often move your little weirdo bit of code into a function that is off the main call path and if people don't like it, they don't have to look at it. Also the fact that your change is in a single commit means they can always revert it if they don't like it (a bluff almost nobody calls).
More importantly, when it comes time to port the code, the intent of your weird little code is both known and self-contained. They can decide what to do about it and have a path to do it.
When your clever tweaks are peppered throughout your data architecture and half of the code base, then porting is a costly affair. And in some cases just updating your tools is hampered as well.
- mumblemumble 5y agoIt's true. Though I suspect that the proportion of code whose portability is hampered by clever code like this is vanishingly small compared to the volume of code whose portability is hampered by things like, "assumes POSIX-style file handling", "makes lots of DOS syscalls", or "targets AVR microcontrollers."