Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 3 Mar 2012 13:40:18 GMT
From:      Chris Rees <utisoft@gmail.com>
To:        freebsd-ports-bugs@FreeBSD.org
Subject:   Re: ports/165623: Mk/bsd.comands.mk et al -- conflicting uses of ${FILE}
Message-ID:  <201203031340.q23DeIFV021451@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/165623; it has been noted by GNATS.

From: Chris Rees <utisoft@gmail.com>
To: Matthew Seaman <m.seaman@infracaninophile.co.uk>
Cc: "bug-followup@freebsd.org" <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 <m.seaman@infracaninophile.co.uk> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201203031340.q23DeIFV021451>