Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:110035 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 59201 invoked from network); 6 May 2020 11:45:30 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 6 May 2020 11:45:30 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id DD5101804F8 for ; Wed, 6 May 2020 03:20:38 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-lj1-f181.google.com (mail-lj1-f181.google.com [209.85.208.181]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Wed, 6 May 2020 03:20:32 -0700 (PDT) Received: by mail-lj1-f181.google.com with SMTP id w20so1775828ljj.0 for ; Wed, 06 May 2020 03:20:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=l1vgtSf4HDE8H1jEw1jzsGgUG/2Kg4px0LHgneN7kDM=; b=lSlOy51Zhem67nvBW+H4rtli2C6FzIa7E2js9ntFwn8YHSlpjfRhbu/ZspGC+9s+oM 0vJlE7zwR27zcj+ZRag7AAX6oDB+6CKv0BIhIrBPO5pIp1C66066VTmSHLphZviXhq4j U1joIqoWAp3JjmH7Vla9O6LiwGkrF4JWGYXGIP9w6gtvqQQlzw86LaVPlXzjIUP/V7DK lnX0SNVgB3ri5zGYmuBVnenQKmSAXMsQLhDT1Gr1uaitedEgwHSojy466ERSNcuG8Nz4 QRnwjTDC06KIKmFgZUlrplIMCiyZaoyqYhBvdBOOb7KSRz1jqpJ/+L5TwmV+ZLWGBc0y 0+Ow== X-Gm-Message-State: AGi0PuYBxBR6QtkIrKd6+8AeV8wYpUDzfzTdERFx91MglFa385rnA9Ro uMzUV6CaDyb5v2rL6IKDBWrDZS+94K0= X-Google-Smtp-Source: APiQypLDhPBI+irN5mDRBib/4Mid0K7aQqQWCtKKvCbd3CeK+0BhLD3/x3Ud1E8JYZ5NZUqInL1PGQ== X-Received: by 2002:a2e:82c7:: with SMTP id n7mr4613115ljh.47.1588760430672; Wed, 06 May 2020 03:20:30 -0700 (PDT) Received: from mail-lj1-f182.google.com (mail-lj1-f182.google.com. [209.85.208.182]) by smtp.gmail.com with ESMTPSA id g22sm1016029ljl.17.2020.05.06.03.20.30 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 06 May 2020 03:20:30 -0700 (PDT) Received: by mail-lj1-f182.google.com with SMTP id j3so1731086ljg.8 for ; Wed, 06 May 2020 03:20:30 -0700 (PDT) X-Received: by 2002:a05:651c:112c:: with SMTP id e12mr4463486ljo.127.1588760429827; Wed, 06 May 2020 03:20:29 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Wed, 6 May 2020 18:20:18 +0800 X-Gmail-Original-Message-ID: Message-ID: To: "Christoph M. Becker" Cc: PHP internals Content-Type: multipart/alternative; boundary="0000000000000d9dc305a4f81d3a" Subject: Re: [PHP-DEV] Update coding standards wrt. C99? From: laruence@php.net (Xinchen Hui) --0000000000000d9dc305a4f81d3a Content-Type: text/plain; charset="UTF-8" Hey: On Wed, May 6, 2020 at 3:32 PM Christoph M. Becker wrote: > Hi all, > > since master requires (mostly) C99 compliant compilers anyway, I wonder > if we like to update our coding standards[1], to reflect: > > * that we require (mostly) C99 compliant compilers (instead of ANSI-C > compliant compilers) > > * that mixing of declarations and statements is fine > IMO, mixing variables and codes are always not a good practice, strict is always means tidy.. mixing declarations and codes sometimes brings unexpected varaibles overriden and hard to debugging. and, I don't think make variables declaration at top of a block is a hard thing to do. thanks > * that C++ style comments are now allowed, or maybe that they are still > forbidden (in the latter case the stated reasons should be updated) > > We may also consider to drop the "Documentation and folding hooks"[2] > section; besides that it is already partially outdated (AIUI, > doc/genfuncsummary is superseeded by doc/docgen for a long time), I > don't think these folding markers encapsulating each individual function > are useful nowadays. > > Thoughts? > > [1] > [2] > < > https://github.com/php/php-src/blob/master/CODING_STANDARDS.md#documentation-and-folding-hooks > > > > -- > Christoph M. Becker > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > -- Xinchen Hui @Laruence http://www.laruence.com/ --0000000000000d9dc305a4f81d3a--