Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Ian Collins Newsgroups: comp.lang.c Subject: Re: gcc needs a curly bracket matching/counting function Date: Wed, 21 Dec 2016 07:44:50 +1300 Lines: 28 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net uZB8Wx64umM/ga3gY4ufigqAtWXKb2kQoUxm3vNDQ2melYQ5Wx Cancel-Lock: sha1:IhyzZipYJIyXoFBi9G2QblFG2Jg= User-Agent: Mozilla/5.0 (X11; SunOS i86pc; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 In-Reply-To: Xref: csiph.com comp.lang.c:99923 On 12/20/16 11:26 PM, Malcolm McLean wrote: >> > Rule of three. > > Parentheses may have only three levels of nesting. Why? > Use of goto for error-handling flow control helps. ..you write spaghetti code. If you choose to restrict nesting, extract code the would be in an inner loop to a function. > Use i, ii, iii as loop > counter or i, j, k. If you need iv or l (which looks like a 1) > then consider breaking out into a subroutine. This suggestion is horrible: use meaningful names for loop counters as you should for any variable. > If code isn't human-understandable it is far less valuable. It wont be human-understandable if you follow your suggestions! -- Ian