[Python-Dev] Does trunk still support any compilers that *don't* allow declaring variables after code?

Larry Hastings larry at hastings.org
Wed May 2 10:43:32 CEST 2012

Right now the CPython trunk religiously declares all variables at the 
tops of scopes, before any code, because this is all C89 permits.  Back 
in the 90s all the C compilers took a page out of the C++ playbook and 
independently, but nearly without exception, extended the language to 
allow you declaring new variables after code statements.  This became an 
official part of the language with C99 back in 1999.

It's now 2012.  As I step out of my flying car onto the moving walkway 
that will glide me noiselessly into my platform sky dome... I can't help 
but think that we're a bit hidebound, slavishly devoting ourselves to 
C89.  CPython 3.3 drops support for VMS, OS/2, and even Windows 2000.

I realize we can't jump to C99 because of A Certain Compiler.  (Its name 
rhymes with Bike Row Soft Frizz You All See Muss Muss.)  But even that 
compiler added this extension in the early 90s.

Do we officially support any C compilers that *don't* permit 
"intermingled variable declarations and code"?  Do we *unofficially* 
support any?  And if we do, what do we gain?

Just itching to pull some local macro hijinx, is all,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20120502/52235e94/attachment.html>

More information about the Python-Dev mailing list