[arch-general] [arch-dev-public] Let's agree on a common coding style

Thomas Bächler thomas at archlinux.org
Sat Feb 13 16:11:01 EST 2010


Am 13.02.2010 21:57, schrieb Dieter Plaetinck:
>>> For example, in a PKGBUILD I would write ${pkgname}_$pkgver,
>>> because _ can be part of a variable name, but I'd much rather
>>> prefer to use $pkgname-$pkgver, since hyphens are not allowed in
>>> variable names.
>>>
>>> Less typing, less ugliness. :)
>>>
>>
>> This is the way I've always done it and it's much nicer to read. Same
>> for quoting, use only when needed.
> 
> +1 for braces around vars only when needed.

If you use braces only when necessary, it will not be consistent - you
have braces sometimes and other times you don't. I thought coding style
was about consistency.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://mailman.archlinux.org/pipermail/arch-general/attachments/20100213/f73979bd/attachment-0001.bin>


More information about the arch-general mailing list