Return-Path: X-Original-To: apmail-corinthia-dev-archive@minotaur.apache.org Delivered-To: apmail-corinthia-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2CB8610E62 for ; Tue, 6 Jan 2015 18:26:56 +0000 (UTC) Received: (qmail 30350 invoked by uid 500); 6 Jan 2015 18:26:57 -0000 Delivered-To: apmail-corinthia-dev-archive@corinthia.apache.org Received: (qmail 30323 invoked by uid 500); 6 Jan 2015 18:26:57 -0000 Mailing-List: contact dev-help@corinthia.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@corinthia.incubator.apache.org Delivered-To: mailing list dev@corinthia.incubator.apache.org Received: (qmail 30298 invoked by uid 99); 6 Jan 2015 18:26:54 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Jan 2015 18:26:54 +0000 X-ASF-Spam-Status: No, hits=1.0 required=5.0 tests=SPF_SOFTFAIL X-Spam-Check-By: apache.org Received-SPF: softfail (athena.apache.org: transitioning domain of dennis.hamilton@acm.org does not designate 216.234.124.51 as permitted sender) Received: from [216.234.124.51] (HELO barracuda.supercp.com) (216.234.124.51) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Jan 2015 18:26:48 +0000 X-ASG-Debug-ID: 1420568786-0798da1d4ee02ff0001-KCmPzH Received: from a2s42.a2hosting.com (a2s42.a2hosting.com [216.119.133.2]) by barracuda.supercp.com with ESMTP id e3mBb3mb4mElPFkd for ; Tue, 06 Jan 2015 13:26:26 -0500 (EST) X-Barracuda-Envelope-From: dennis.hamilton@acm.org X-Barracuda-Apparent-Source-IP: 216.119.133.2 Received: from 97-113-57-118.tukw.qwest.net ([97.113.57.118]:32834 helo=Astraendo2) by a2s42.a2hosting.com with esmtpa (Exim 4.82) (envelope-from ) id 1Y8Ypk-002gtE-96 for dev@corinthia.incubator.apache.org; Tue, 06 Jan 2015 13:26:24 -0500 Reply-To: From: "Dennis E. Hamilton" To: Subject: Coding Standards page Date: Tue, 6 Jan 2015 10:26:24 -0800 X-ASG-Orig-Subj: Coding Standards page Organization: NuovoDoc Message-ID: <005b01d029de$4819bff0$d84d3fd0$@acm.org> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 15.0 Thread-Index: AdAp2QHf0f0FyH7NS/OspFsxwS7SRw== Content-Language: en-us X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - a2s42.a2hosting.com X-AntiAbuse: Original Domain - corinthia.incubator.apache.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - acm.org X-Get-Message-Sender-Via: a2s42.a2hosting.com: authenticated_id: himself+orcmid.com/only user confirmed/virtual account not confirmed X-Barracuda-Connect: a2s42.a2hosting.com[216.119.133.2] X-Barracuda-Start-Time: 1420568786 X-Barracuda-URL: https://216.234.124.51:443/cgi-mod/mark.cgi Received-SPF: softfail (supercp.com: domain of transitioning dennis.hamilton@acm.org does not designate 97.113.57.118 as permitted sender) X-Virus-Scanned: by bsmtpd at supercp.com X-Barracuda-BRTS-Status: 1 X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=4.0 KILL_LEVEL=5.0 tests=BSF_SPF_SOFTFAIL X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.14000 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.00 BSF_SPF_SOFTFAIL Custom Rule SPF Softfail X-Virus-Checked: Checked by ClamAV on apache.org I am looking at this page: = . Here are some random remarks. I don't want to touch the material = without some discussion of what is important on this page. I notice there are a number of editorial remarks that don't give much = light into what the conventions are. I would remove most of that. The general rule for open-source contributions is to honor the style = that is used in the code. Here is a too-rambling description of K&R = style, . The use of white space is important and that has to be spelled out = because it is not obvious when looking at the code. I would separate out code formatting from other aspects of contributions = (such as tests, etc.). Code formatting is pretty low level and = contributions, inclusion of tests, etc., are at a different level of = practice. I notice that the requirement for Unix line endings is not included, nor = is there information on how to control that when working with the = repository. I also notice that we've not said anything about comments and also if = any documentation-extraction conventions are being applied. =20 There is also, with this Apache project, the standard rules for the ASF = Copyright headers. Oh, and C++ dependencies. I assume that all function entry points are = CDECL, yes? If that is the case, the use of Corinthia APIs from C++ = code need to reflect the extern "C" business. INCLUDE STATEMENTS I don't understand the prohibition of #include in header files. Is = there a technical reason for this? =20 An obvious occasion for nested #include cases is when a header defines = some sort of structure or function prototype that depends on some types = that are defined in other headers. The obvious place to handle the = dependency is in the header that needs those to be defined. This does raise conventions for assuring that headers are not processed = repeatedly. (We should also not be depending on precompiled headers. = That is an old hack that no longer makes sense and has become a = meaningless ritual.)