Kyle Stanley <aeros...@gmail.com> added the comment:

> 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.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue37812>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to