[PATCH build 3/3] Use consistent parameter expansion notation.
Gaetan Nadon
memsize at videotron.ca
Thu Sep 16 13:17:33 PDT 2010
On Thu, 2010-09-16 at 06:04 -0700, Dan Nicholson wrote:
> Clearly this is just bikeshedding, but I think this practice sucks.
> There are very clear times when the braces are useful or needed to
> delimit variables or do parameter expansion. Every other usage is just
> adding extra characters and typing. This diff is a perfect example of
> it: 114 lines changed for zero functional difference.
>
My bash book implicitly agrees. The $varname syntax is a simpler form of
${varname}.
The book enumerates cases where you must use it. By not using braces
when not required, it gives
additional information to the reader of the script about values the
variable may or may not have.
Gaetan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.x.org/archives/xorg-devel/attachments/20100916/243d7962/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
URL: <http://lists.x.org/archives/xorg-devel/attachments/20100916/243d7962/attachment.pgp>
More information about the xorg-devel
mailing list