Raymond Hettinger <raymond.hettin...@gmail.com> added the comment:

Be careful about performance.  We know for sure that macros will inline.  In 
contrast, inline functions might or might not inline (there are rules for when 
it can be done).  When applied across source files, inlining often only occurs 
with an LTO build — any other build can't inline across object files.  
Historically, we've never had to depend on LTO, so that would be a regression 
for some users.  We've already have a performance bug that needed to be 
reverted because of too aggressive conversion of macros to inline functions.  

A problem with these blanket PRs is that they second guess the original 
developer who may have made a conscious and informed decision to use a macro.  
If you really think that developer was wrong, they should be included in the 
conversation and given the chance to opt in or out.  Otherwise, we're 
mechanically undoing previous intelligent efforts.

Ideally, there needs to be a more nuanced view than "macros are bad, inline 
functions are good".

----------
nosy: +pablogsal, rhettinger

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

Reply via email to