Message352833
> I'm one of the first to advocate to replace ugly macros with clean static inline functions. Macros are evil and can be too easily misused.
As someone who has only more recently started learning the C-API (and C in general), I'm certainly in favor of replacing macros with functions when possible. I might be a bit biased, but it definitely makes the code a lot easier to understand (especially the macros with implicit returns). As long as there's not a significant performance loss and it doesn't introduce new complications, I don't see an issue with it.
From my understanding, readability isn't as high of a priority in the C code, but certainly there's some benefit to improving areas that are more difficult to understand. The easier the code is to understand, the lower the overall maintenance cost becomes.
Of course, this should certainly be done in moderation to reduce the introduction of unnecessary new bugs and the cost in reviewer time for more pressing concerns. |
|
Date |
User |
Action |
Args |
2019-09-20 04:50:02 | aeros | set | recipients:
+ aeros, rhettinger, mark.dickinson, vstinner, malin, Greg Price, sir-sigurd |
2019-09-20 04:50:02 | aeros | set | messageid: <1568955002.86.0.347987442283.issue37812@roundup.psfhosted.org> |
2019-09-20 04:50:02 | aeros | link | issue37812 messages |
2019-09-20 04:50:02 | aeros | create | |
|