trinity-devel@lists.pearsoncomputing.net

Message: previous - next
Month: January 2015

Re: [trinity-devel] Codebase formatting discussion

From: Michele Calgaro <michele.calgaro@...>
Date: Wed, 21 Jan 2015 07:35:47 +0900
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

On 01/21/2015 01:53 AM, Sl�vek Banko wrote:
> Two spaces seem to me sufficient to good readability, while there was no violated clarity.
> 
> Writing assignments and conditions in the 'for' without spaces results in inconsistence style with herself. Or, if
> you propose to remove spaces in assignments and conditions in all code, will make hard to read all code.
> 
> For example - without spaces it simply disgust:
> 
> for (x=1,y=5; x<10&&y>0; x++,y--) { }
> 
> 
> with spaces It's not beautiful, but at least readable:
> 
> for (x = 1, y = 5;  x < 10 && y > 0;  x++, y--) { }
> 
> 
> Therefore, the use of two spaces seems to me the least painful. Just my two cents.
I also think the second is more readable than the first. Alternatively we can go for

for (x = 1, y = 5;
     x < 10 && y > 0;
     x++, y--)

although it is a waste of vertical space IMO.

cheers
  Michele
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBCgAGBQJUvthDAAoJECp1t8qK3tXPxAwP/jmX6yk3+XBF4exoJ8G/wIM2
8eVMn0u/KopQhSPxi3ODV5LZdVcwpCU6V5j9VPucQu17unSKSj1CFds+suyP+k1D
Ayhbmy/OPPuaMwd+nqa/SgA9W2iX7Fw/j9Fe/qzlBX/cbh+nrYkW88iLjGN4X2sa
+eOhffaIU/5kT/2ef/8r858OG3OCsZOnA2Gx2JDiueAelBxnHpEeXP3RjHyvQSEP
cSipmgazAXVS8zS7xRIQUhiAswbg0UUZTgWY56Ia+bodyt12J8rMQYmGi94WRAGq
asOe4pZgbMzPSKn4u3Y1fSTOG7X/gGWWRLjCuXFqY/u15pZeIzZRIcxxYCCFVC+E
A4KJ52lKtXhwUcPsYQjKK1fduLAwUD85vTLWn+pGIj1cKxFgIrYkZjuUd3Gcszrl
dAV348MmbA1/MmmC0vRkDkcpLnDDd8BLWrfMrfhFCb1tIigBSY0zhpyb4E0NQTka
i5SgEnAHibafES1twYmBFnVHddkEv7mDF1QkwlhNo2kIQHBmS5PNKEn4kBm0zL7m
xP1QbN2PqWZX53CpoemnmB1WDK09LEK0uHVzL0CTuus677pRjHlkK2ENRaK/bqVt
49BllLl4MC7HAlyUdUZasoyd+x7IfSOJN2G8W+Ohdu//QWW/PC2Xa2chrf7G6gME
ekOeB8nKg/PcIXevidLf
=smeT
-----END PGP SIGNATURE-----