On Thu, Aug 16, 2012 at 12:07 PM, Michael Stahl <mstahl@redhat.com> wrote:
so this:
if( pCT->pInsBox )
{
pCT->pInsBox->GetTabLines().push_back( pNewLine );
}
else
{
pCT->pTblNd->GetTable().GetTabLines().push_back( pNewLine );
}
could be much shorter, with only 20% brace line overhead:
if( pCT->pInsBox ) {
pCT->pInsBox->GetTabLines().push_back( pNewLine );
} else {
pCT->pTblNd->GetTable().GetTabLines().push_back( pNewLine );
}
and
if( pCT->pInsBox ) { pCT->pInsBox->GetTabLines().push_back( pNewLine ); } else {
pCT->pTblNd->GetTable().GetTabLines().push_back( pNewLine );}
is 80% shorter.. what's the point ?
The braces lines are not 'overhead', there are visual-aid... chasing
'{' at the end of lines is cumbersome and slow, and the irregularity
of the use of braces at all make the endeavor even more cumbersome and
error prone.
you said it yourself:
"rationale: in this case it's good to visually separate the condition
from the compound statement, e.g. this is a PITA to read: [...]
so you agree that " it's good to visually separate the condition
from the compound statement,"
which version best achieve that goodness:
if( pCT->pInsBox )
{
pCT->pInsBox->GetTabLines().push_back( pNewLine );
}
else
{
pCT->pTblNd->GetTable().GetTabLines().push_back( pNewLine );
}
or
if( pCT->pInsBox ) {
pCT->pInsBox->GetTabLines().push_back( pNewLine );
} else {
pCT->pTblNd->GetTable().GetTabLines().push_back( pNewLine );
}
( it is a rhetorical question)
furthermore, how many people still use 80x24 terminal ? iow, why
putting a premium on vspace at the expense of readability ?
Norbert
Context
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.