Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:76129 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 16058 invoked from network); 25 Jul 2014 17:22:08 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Jul 2014 17:22:08 -0000 X-Host-Fingerprint: 217.114.215.11 experimentalworks.net Date: Fri, 25 Jul 2014 13:22:06 -0400 Received: from [217.114.215.11] ([217.114.215.11:19421] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 4E/A6-08559-E3292D35 for ; Fri, 25 Jul 2014 13:22:06 -0400 To: internals@lists.php.net References: User-Agent: slrn/pre1.0.0-18 (Linux) Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-ID: X-Posted-By: 217.114.215.11 Subject: Re: [PHP-DEV] Thoughts on C version supported for PHP-Next From: dsp@php.net (David Soria Parra) On 2014-07-25, Andrea Faulds wrote: > > On 25 Jul 2014, at 18:02, Nikita Popov wrote: > >> 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. > > Well, we don’t need to allow all of C99. We can simply allow using features that are widely supported and actually useful. For example, declarations between statements, and C++-style line comments with //. > > Though for consistency with the rest of the codebase, perhaps we should stick to C-style /* */ comments. It is hard to judge what "widely supported" means. PHP is so widespread that people run it on embedded systems, 10+ year old servers (see old masters.php.net) and compile them with compiler most of us have never touched (suncc, pcc). I think we have to come up with good arguments for C99 support that we just can't do with C89 in order to potentially keep out people. tl;dr: I believe unless we have strong arguments we should acknowkledge that PHP is so widespread that changing compiler can make some users unhappy and if we don't have really good reasons we shouldn't.