On Fri, Jul 25, 2014 at 6:37 PM, Julien Pauli <jpa...@php.net> wrote:
> Hey ! > > Just a quick word to launch the debate. > Disclamer : This is not a C vs C++ talk, thank you :-) > > We nowadays support C89 officially . It is very stable and well implemented > in almost every compiler nowadays, but it is old and lack some features we > could benefit from. > > Why not take PHP-Next step to support a more recent version ? > Even C99 would be allright and C11 would be super cool (though pretty > recent). > > I know we support lots of compilers (even if that's not really documented), > and some of them could fail at supporting some C versions. > > However, as PHP-Next is a big step in modernizing PHP, why not have a > discussion about the C versions our souce code base should support ? > > Just to say, perhaps it's a dead and debate because of a big blocker point. > I think the main question here is whether MSVC will have good C99 support by the time PHP-Next is released. The other major compilers (GCC, Clang, Intel) may not support all of C99 (esp stuff like FP pragmas), but have a reasonable degree of support. If we can, I'd be very much in favor of using C99. In particular mixed code+declarations is a major code quality improvement to me. Nikita