Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:110036 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 60892 invoked from network); 6 May 2020 11:47:56 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 6 May 2020 11:47:56 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id A26E31804C3 for ; Wed, 6 May 2020 03:23:05 -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-lf1-f49.google.com (mail-lf1-f49.google.com [209.85.167.49]) (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:23:05 -0700 (PDT) Received: by mail-lf1-f49.google.com with SMTP id h26so871238lfg.6 for ; Wed, 06 May 2020 03:23:05 -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=ZBWT3HtJEPjDzgt068i9RfFSIZzGtzCKFTbZO0s0YxI=; b=My/xhAbnwA8+NhK8+n3vXM6s7CSfU4MjNDH91X2qyd6voKSLrqNarqX84LLL8bmi1Q BumCTGGdnEHe4f763CVqYtAGMUObUpnDzl02m7HRegY8owmjt1mWGbog36pSK2x90d8I /Bz6PNQAjOn+LyUOcjgL4QmztsZywOSilxo1rRa6sLJl2rxwe4D85dAw805Vmh6W5kg6 YbtnnwKMeH2w0vWO1xg993HI0b4cKM++hP9GUpdjuNOu8mn86iW12lXfxkw2CfU8EeSd DaYLVz0pxj0s7IOKZCV7p2CMtoixOAxOPUldW4dBymmnfDKkJsQqTzGJ8dqggL6jPdVY Netw== X-Gm-Message-State: AGi0PuY9uK6k9/lZVqdmnYt/n2NiPbAdxHKvJOxlPLIMM51P4P58eJPA 0fnRbCBCt1nrd27U9SEl71QJEWYIthpyWw== X-Google-Smtp-Source: APiQypIN/nP7yCMYqIjjHm7RJ1rar9iydDPSwQdjz+w9GyCrJ/FgO7rjRPHMGVOG3HC4qpXA3uXE1g== X-Received: by 2002:a19:f00b:: with SMTP id p11mr4664514lfc.210.1588760581381; Wed, 06 May 2020 03:23:01 -0700 (PDT) Received: from mail-lf1-f49.google.com (mail-lf1-f49.google.com. [209.85.167.49]) by smtp.gmail.com with ESMTPSA id 4sm999003ljf.79.2020.05.06.03.23.00 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 06 May 2020 03:23:01 -0700 (PDT) Received: by mail-lf1-f49.google.com with SMTP id t11so874687lfe.4 for ; Wed, 06 May 2020 03:23:00 -0700 (PDT) X-Received: by 2002:a05:6512:3f8:: with SMTP id n24mr4802838lfq.179.1588760580592; Wed, 06 May 2020 03:23:00 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Wed, 6 May 2020 18:22:49 +0800 X-Gmail-Original-Message-ID: Message-ID: To: "Christoph M. Becker" Cc: PHP internals Content-Type: multipart/alternative; boundary="0000000000000a27ae05a4f82668" Subject: Re: [PHP-DEV] Update coding standards wrt. C99? From: laruence@php.net (Xinchen Hui) --0000000000000a27ae05a4f82668 Content-Type: text/plain; charset="UTF-8" On Wed, May 6, 2020 at 6:20 PM Xinchen Hui wrote: > > 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. > And for me, and maybe others who have been work with c89 years, mixed declaration and codes are guly. . anyway, it's just my 2 cents. thanks > > 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/ > -- Xinchen Hui @Laruence http://www.laruence.com/ --0000000000000a27ae05a4f82668--