<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif;">
<div>ndn-cxx already has plenty of code with the first option. This looks good to me. For example:</div>
<div><a href="https://github.com/named-data/ndn-cxx/blob/34a37630a14c67309467074b448057dbf62cda65/src/security/key-chain.cpp#L338">https://github.com/named-data/ndn-cxx/blob/34a37630a14c67309467074b448057dbf62cda65/src/security/key-chain.cpp#L338</a></div>
<div><br>
</div>
<div>
<p style="margin: 0px; font-size: 12px; font-family: Menlo;">certName.append(signingIdentity)</p>
<p style="margin: 0px; font-size: 12px; font-family: Menlo;">  .append(<span style="color: #c59c9c">"KEY"</span>)</p>
<p style="margin: 0px; font-size: 12px; font-family: Menlo;">  .append(keyName.getSubName(signingIdentity.size()))</p>
<p style="margin: 0px; font-size: 12px; font-family: Menlo;">  .append(<span style="color: #c59c9c">"ID-CERT"</span>)</p>
<p style="margin: 0px; font-size: 12px; font-family: Menlo; color: rgb(215, 57, 30);">
<span style="color: #000000">  .appendVersion()</span>;                                                                                                                     </p>
</div>
<div><br>
</div>
<div>- Jeff T</div>
<div><br>
</div>
<span id="OLK_SRC_BODY_SECTION">
<div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<span style="font-weight:bold">From: </span>Junxiao Shi <<a href="mailto:shijunxiao@email.arizona.edu">shijunxiao@email.arizona.edu</a>><br>
<span style="font-weight:bold">Date: </span>Wednesday, March 11, 2015 at 15:45<br>
<span style="font-weight:bold">To: </span>nfd-dev <<a href="mailto:nfd-dev@lists.cs.ucla.edu">nfd-dev@lists.cs.ucla.edu</a>><br>
<span style="font-weight:bold">Subject: </span>[Nfd-dev] code-style "make incompleteness of split lines obvious" vs chained operations<br>
</div>
<div><br>
</div>
<div>
<div>
<div dir="ltr">Dear folks
<div><br>
</div>
<div>Rule 1.12 says:</div>
<blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px">
<div>The incompleteness of split lines must be made obvious.</div>
<div>
<div><br>
</div>
</div>
<div>
<div>Split lines occurs when a statement exceed the 80 column limit given above.</div>
</div>
<div>
<div>It is difficult to give rigid rules for how lines should be split, but the examples above should give a general hint.</div>
</div>
<div>
<div><br>
</div>
</div>
<div>
<div>In general:</div>
</div>
</blockquote>
<div>
<div>
<ul>
<ul>
<li>Break after a comma.</li><li>Break after an operator.</li><li>Align the new line with the beginning of the expression on the previous line.</li></ul>
</ul>
</div>
</div>
<div><br>
</div>
<div><br>
</div>
<div>I'm curious how to format the following snippet: (for this example, let's suppose it doesn't fit in the line width limit)</div>
<div><br>
</div>
<div>
<div><font face="monospace,monospace">return QString("%1:%2:%3)</font></div>
<div><font face="monospace,monospace">       .arg(localTime->tm_hour, 2, 10, '0')</font></div>
<div><font face="monospace,monospace">       .arg(localTime->tm_min, 2, 10, '0')</font></div>
<div><font face="monospace,monospace">       .arg(localTime->tm_sec, 2, 10, '0');</font></div>
</div>
<div><br>
</div>
<div>Technically ')' is an operator so I can break after it, but this doesn't make the incompleteness obvious.</div>
<div><br>
</div>
<div><br>
</div>
<div>If I break after the dot operator, the snippet becomes:</div>
<div><br>
</div>
<div>
<div><font face="monospace,monospace">return QString("%1:%2:%3).</font></div>
<div><font face="monospace,monospace">         arg(localTime->tm_hour, 2, 10, '0').</font></div>
<div><font face="monospace,monospace">         arg(localTime->tm_min, 2, 10, '0').</font></div>
<div><font face="monospace,monospace">         arg(localTime->tm_sec, 2, 10, '0');</font></div>
</div>
<div><br>
</div>
<div>but the bare "arg" in the front doesn't look good.<br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>If I break after the '(' operator, the snippet becomes:</div>
<div><br>
</div>
<div>
<div><font face="monospace,monospace">return QString("%1:%2:%3).</font><span style="font-family: monospace, monospace;">arg(</span></div>
<div><span style="font-family: monospace, monospace;">         localTime->tm_hour, 2, 10, '0').</span><span style="font-family: monospace, monospace;">arg(</span></div>
<div><span style="font-family: monospace, monospace;">         localTime->tm_min, 2, 10, '0').</span><span style="font-family: monospace, monospace;">arg(</span></div>
<div><span style="font-family: monospace, monospace;">         localTime->tm_sec, 2, 10, '0');</span></div>
</div>
<div><br>
</div>
<div>but this is also weird.<br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>If I break after the comma, the snippet becomes:<br>
</div>
<div><br>
</div>
<div>
<div><font face="monospace,monospace">return QString("%1:%2:%3)</font><span style="font-family: monospace, monospace;">.arg(localTime->tm_hour,</span></div>
<div><span style="font-family: monospace, monospace;">                              2, 10, '0')</span><span style="font-family: monospace, monospace;">.arg(localTime->tm_min,</span></div>
<div><span style="font-family: monospace, monospace;">                                              2, 10, '0')</span><span style="font-family: monospace, monospace;">.arg(localTime->tm_sec,</span></div>
<div><span style="font-family: monospace, monospace;">                                                              2, 10, '0');</span></div>
</div>
<div><br>
</div>
<div>which looks even worse.</div>
<div><br>
</div>
<div><br>
</div>
<div>Yours, Junxiao</div>
</div>
</div>
</div>
</span>
</body>
</html>