From owner-freebsd-ports-bugs@FreeBSD.ORG Sat Mar 3 13:40:18 2012 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 596661065740 for ; Sat, 3 Mar 2012 13:40:18 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 445C08FC0A for ; Sat, 3 Mar 2012 13:40:18 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q23DeIYi021452 for ; Sat, 3 Mar 2012 13:40:18 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q23DeIFV021451; Sat, 3 Mar 2012 13:40:18 GMT (envelope-from gnats) Date: Sat, 3 Mar 2012 13:40:18 GMT Message-Id: <201203031340.q23DeIFV021451@freefall.freebsd.org> To: freebsd-ports-bugs@FreeBSD.org From: Chris Rees Cc: Subject: Re: ports/165623: Mk/bsd.comands.mk et al -- conflicting uses of ${FILE} X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Chris Rees List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Mar 2012 13:40:18 -0000 The following reply was made to PR ports/165623; it has been noted by GNATS. From: Chris Rees To: Matthew Seaman Cc: "bug-followup@freebsd.org" Subject: Re: ports/165623: Mk/bsd.comands.mk et al -- conflicting uses of ${FILE} Date: Sat, 3 Mar 2012 13:34:58 +0000 On 3 March 2012 13:29, Matthew Seaman wro= te: > On 03/03/2012 12:56, Chris Rees wrote: > >> Or we could put the portlint check in, and people who don't want to see = it >> complain could use lowers for loop vars. >> >> Sorry to go on about this, but it's very important to differentiate, >> considering that their behaviour is very different from regular variable= s. >> >> Note that I withdraw my objection to FILE_CMD as per pointers from other= s :) > > So make it a matter of style that loop iterators should be lower case? > That is an idea I can agree with. =A0Not being too prescriptive about it, > and allowing people to make that modification organically -- when they > have to update a port for another reason, etc. is also something I can > agree with. > > Although it turns out there's fewer instances of using uppercase > iterators than I at first thought: > > lucid-nonsense:/usr/ports:% grep -rlE '^\. *for +[A-Z]+' * | wc -l > =A0 =A0 341 I think it's a matter of style, but also makes people think harder when they make boo-boos like: OTHER=3D TWO .for iterator in ONE TWO THREE . if ${iterator} =3D=3D ${OTHER} FOO=3D bar . endif .endfor which ends up as a malformed conditional. Alarm bells ring more quickly if one sees the lowercase used on the left like this. (should be ${OTHER} =3D=3D ${iterator}) Have I confused anyone yet? Chris