This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Mark.Shannon
Recipients Mark.Shannon, vstinner
Date 2022-03-30.13:16:10
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1648646170.61.0.811459489208.issue47164@roundup.psfhosted.org>
In-reply-to
Content
I think that adding macros makes readability worse.

The macro is only more readable if you already know what it does.
If you don't, then you need to look up the macro, and understand the cast in the macro (which is harder than understanding the original cast).


In general, I find the excessive use of macros and tiny inline function obscures the meaning of code, and makes it hard to reason about what the code is doing.

A few well chosen macros (like Py_INCREF(), etc) can definitely help readability, but if there are too many then anyone reading the code ends up having to lookup loads of macro definitions to understand the code.



Without the macro, the reader needs to parse the cast, which is admittedly a
History
Date User Action Args
2022-03-30 13:16:10Mark.Shannonsetrecipients: + Mark.Shannon, vstinner
2022-03-30 13:16:10Mark.Shannonsetmessageid: <1648646170.61.0.811459489208.issue47164@roundup.psfhosted.org>
2022-03-30 13:16:10Mark.Shannonlinkissue47164 messages
2022-03-30 13:16:10Mark.Shannoncreate