<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="Generator" content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.hoenzb
        {mso-style-name:hoenzb;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style></head><body lang="EN-US" link="blue" vlink="purple"><div class="WordSection1"><p class="MsoNormal"><a name="_MailEndCompose"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">If ()</span></a></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">{</span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">  Blah</span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">}</span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">+2</span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">If () {</span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">  Blah</span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">}</span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">+1</span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Allowing people to use whichever one they feel like</span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">-10</span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">I find that code consistency makes it a lot easier for me to get into a new class in VTK.  So I would say if you want to move to “if () {“ then do it all at once and then that is the standard. I think most everyone agrees that Berk’s original suggestion is an improvement. I’m not as sure about switching to “if () { “ I think that could be more divisive. Maybe not.</span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">FWIW my brain still hurts when I see four different ways of creating an instance spread throughout the code ala</span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">VTK_NEW(class)</span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">vtkNew<class></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">vtkSmartPointer<class></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">class::New()</span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">I have no clue which one to use so I try to use them all equally, in the same function :-)</span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Ken Martin PhD</span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Chairman & CFO</span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Kitware Inc.</span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">28 Corporate Drive</span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Clifton Park NY 12065</span></p><p class="MsoNormal"><a href="mailto:ken.martin@kitware.com"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">ken.martin@kitware.com</span></a><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">919 869-8871 (w)</span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee.  Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message.  Thank you.</span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span></p><p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> vtk-developers [mailto:<a href="mailto:vtk-developers-bounces@vtk.org">vtk-developers-bounces@vtk.org</a>] <b>On Behalf Of </b>Berk Geveci<br><b>Sent:</b> Wednesday, September 9, 2015 3:57 PM<br><b>To:</b> Brad King<br><b>Cc:</b> VTK Developers<br><b>Subject:</b> Re: [vtk-developers] PROPOSAL: Changing VTK's indentation style</span></p><p class="MsoNormal"> </p><div><p class="MsoNormal">+1 to Brad's suggestion,</p></div><div><p class="MsoNormal"> </p><div><p class="MsoNormal">On Wed, Sep 9, 2015 at 3:41 PM, Brad King <<a href="mailto:brad.king@kitware.com" target="_blank">brad.king@kitware.com</a>> wrote:</p><p class="MsoNormal">On 9/9/2015 9:53 AM, Shawn Waldon wrote:<br>> It would be nice to have a format that doesn't require twiddling<br>> with the editor(s) so much.<br><br>Yes.<br><br>> Having said that, I prefer that we do what<br>> Brad suggested and use clang-format.<br><br>After further thought I think we should delay consideration of<br>clang-format.  Let's not allow it to get in the way of Berk's<br>original proposal.  It has a lot of +1s.<br><br>On 9/9/2015 9:22 AM, David Lonie wrote:<br>>   if (...) {<br>>     ...<br>>   }<br>>   else {<br>>     ...<br>>   }<br>[snip]<br>On 9/9/2015 9:43 AM, Ben Boeckel wrote:<br>> I've preferred using "} else {"<br><br>I also like<br><br>  if (...) {<br>    ...<br>  } else {<br>    ...<br>  }<br><br>and it seems to be widely used.  The placement of the opening<br>curly on the block opening line or on its own line does not<br>affect the indentation of the code inside the curly braces,<br>so this choice can be made locally rather than mandated<br>globally.<br><br>--------------------------------------------------------------------<br><br>I propose that we start with a sweeping change implementing<br>Berk's original proposal of just moving the curly braces up<br>one level of indentation:<br><br>  if (...)<br>  {<br>    ...<br>  }<br>  else<br>  {<br>    ...<br>  }<br><br>Then in future edits and/or new code we can allow the opening<br>"{" to be either on its own line or on the block opening line as<br>preferred by individuals.  Changes to curly brace placement can<br>be made incrementally as code is edited to avoid blame poisoning.<br><span style="color:#888888"><br><span class="hoenzb">-Brad</span></span></p><div><div><p class="MsoNormal" style="margin-bottom:12.0pt">_______________________________________________<br>Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br><br>Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br><br>Search the list archives at: <a href="http://markmail.org/search/?q=vtk-developers" target="_blank">http://markmail.org/search/?q=vtk-developers</a><br><br>Follow this link to subscribe/unsubscribe:<br><a href="http://public.kitware.com/mailman/listinfo/vtk-developers" target="_blank">http://public.kitware.com/mailman/listinfo/vtk-developers</a></p></div></div></div><p class="MsoNormal"> </p></div></div></body></html>