[Python-Dev] Start writing inlines rather than macros?

Brett Cannon brett at python.org
Thu Feb 27 17:30:24 CET 2014


On Thu, Feb 27, 2014 at 5:47 AM, Victor Stinner <victor.stinner at gmail.com>wrote:

> Hi,
>
> 2014-02-27 11:22 GMT+01:00 Kristján Valur Jónsson <kristjan at ccpgames.com>:
> > Now, Larry Hastings pointed out that we support C89 which doesn’t support
> > Inlines.  Rather than suggesting here that we update that compatibility
> > requirement,
>
> In practice, recent versions of GCC and Clang are used. On Windows,
> it's Visual Studio 2010. I'm pretty sure that these compilers support
> inline functions.
>
> I'm also in favor of using inline functions instead of long macros
> using ugly hacks like "instr1,instr2" syntax where instr1 used
> assert(). See for example unicodeobject.c to have an idea of what
> horrible macros mean.
>
> I'm in favor of dropping C89 support and require at least C99. There
> is now C11, it's time to drop the old C89.
> http://en.wikipedia.org/wiki/C11_%28C_standard_revision%29


The Visual Studio team has publicly stated they will never support C99, so
dropping C89 blindly is going to alienate a big part of our user base
unless we switch to C++ instead. I'm fine with trying to pull in C99
features, though, that we can somehow support in a backwards-compatible way
with VS.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20140227/238ff64b/attachment.html>


More information about the Python-Dev mailing list