Author aeros
Recipients Greg Price, Ma Lin, aeros, mark.dickinson, rhettinger, sir-sigurd, vstinner
Date 2019-09-20.04:50:02
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1568955002.86.0.347987442283.issue37812@roundup.psfhosted.org>
In-reply-to
Content
> 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.
History
Date User Action Args
2019-09-20 04:50:02aerossetrecipients: + aeros, rhettinger, mark.dickinson, vstinner, Ma Lin, Greg Price, sir-sigurd
2019-09-20 04:50:02aerossetmessageid: <1568955002.86.0.347987442283.issue37812@roundup.psfhosted.org>
2019-09-20 04:50:02aeroslinkissue37812 messages
2019-09-20 04:50:02aeroscreate