<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:st1="urn:schemas-microsoft-com:office:smarttags" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]--><o:SmartTagType
namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="country-region"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="City"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="place"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@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:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";
        color:black;}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:blue;
        text-decoration:underline;}
pre
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.Section1
        {page:Section1;}
/* List Definitions */
@list l0
        {mso-list-id:256255223;
        mso-list-template-ids:-1899196510;}
@list l0:level1
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:36.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
@list l1
        {mso-list-id:1303385383;
        mso-list-template-ids:2015417056;}
@list l1:level1
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:36.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body bgcolor=white lang=EN-US link=blue vlink=blue>
<div class=Section1>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>John, I don’t like the idea. <o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>I realize it is an effort to convert to
the VTK coding style, but I think that coding styles should be consistent
throughout a library. Otherwise it gets difficult to read code as you
constantly have to switch styles. It also increases the possibility of missing subtle
errors.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Surely it is not that much effort to fit
in with the VTK style. With modern text editors it should be simple to
reformat. I think someone at VTK has some scripts for this … but I may be
wrong. I know there is an EMACS thingie for VTK formatting floating around
somewhere.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>I don’t use their style either and
for the vtkParametric functions I had to convert to their style. It took a bit
of time but it also had the advantage that when doing it I had to read the code
and fixed up a few oddities etc. in the code.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Regards<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'> Andrew<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'> <o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<div>
<div class=MsoNormal align=center style='text-align:center'><font size=3
color=black face="Times New Roman"><span style='font-size:12.0pt;color:windowtext'>
<hr size=3 width="100%" align=center tabindex=-1>
</span></font></div>
<p class=MsoNormal><b><font size=2 color=black face=Tahoma><span
style='font-size:10.0pt;font-family:Tahoma;color:windowtext;font-weight:bold'>From:</span></font></b><font
size=2 color=black face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma;
color:windowtext'> vtk-developers-bounces+andrew.amaclean=gmail.com@vtk.org
[mailto:vtk-developers-bounces+andrew.amaclean=gmail.com@vtk.org] <b><span
style='font-weight:bold'>On Behalf Of </span></b>John Biddiscombe<br>
<b><span style='font-weight:bold'>Sent:</span></b> Sunday, 26 March 2006 05:37<br>
<b><span style='font-weight:bold'>To:</span></b> vtk-developers<br>
<b><span style='font-weight:bold'>Subject:</span></b> [vtk-developers] vtk
Coding style : Proposed change</span></font><font color=black><span
style='color:windowtext'><o:p></o:p></span></font></p>
</div>
<p class=MsoNormal><font size=3 color=black face="Times New Roman"><span
style='font-size:12.0pt'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=3 color=black face="Times New Roman"><span
style='font-size:12.0pt'>Dear vtk developers,<br>
<br>
I have a number of modules that I would like to (and have been asked to)
contribute in the near to mid-term future but I do not wish to reformat my code
to fit the vtk coding style. If (for example) vtkNetCDFReader is contributed to
vtk/paraview, I will most likely be doing the majority of maintenance and
fixing work on the class(es). I do not like the vtk coding style as I find it
hard to quickly mentally parse (bracket indentation in particular) and I would
like to reserve the right to use my own coding style on the contributed
class(es). I can digest and debug my own code considerably faster because I am
familiar with the way it is structured and laid out.<br>
<br>
I would like therefore to propose that the vtk coding style (as described here <a
href="http://www.vtk.org/Wiki/VTK_Coding_Standards">http://www.vtk.org/Wiki/VTK_Coding_Standards</a>
) be modified to include the following (additional text in red - apologies for
non html capable email readers)<o:p></o:p></span></font></p>
<ul type=disc>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l0 level1 lfo1'><font size=3 color=black face="Times New Roman"><span
style='font-size:12.0pt'>The indentation style can be characterized as the
"indented brace" style. Indentations are two spaces, and the
curly brace (scope delimiter) is placed on the following line and indented
along with the code (i.e., the curly brace lines up with the code). Example:
<o:p></o:p></span></font></li>
</ul>
<pre><font size=2 color=black face="Courier New"><span style='font-size:10.0pt'> [example deleted]<o:p></o:p></span></font></pre>
<ul type=disc>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l1 level1 lfo2'><font size=3 color=red face="Times New Roman"><span
style='font-size:12.0pt;color:red'>Code contributions/modifications should
use the accepted vtk coding style as outlined in this document, with the
exception that contributions which consist of new modules in their
entirety are permitted to use their own style - provided the style is
consistent throughout the whole contributed module.</span></font><o:p></o:p></li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l1 level1 lfo2'><font size=3 color=red face="Times New Roman"><span
style='font-size:12.0pt;color:red'>Modifications to existing code must
follow the coding style of the module being changed. If the code being
changed is a contributed module which deviates from the accepted vtk style
then the changes should attempt to follow the contributed style.</span></font><o:p></o:p></li>
</ul>
<p class=MsoNormal><font size=3 color=black face="Times New Roman"><span
style='font-size:12.0pt'>To summarize my changes in a nutshell :<br>
Any fixes/modifications/additions to existing code must
follow the coding style of the module being modified : In the vast majority of
cases this means that the standard vtk coding style must be used. All existing
classes must continue to use the vtk coding style. But I (for one) would like
to be able to contribute new code in my own style and anyone modifying the code
I have contributed should follow the style I have used in the module as best
they can.<br>
<br>
If this proposal is accepted, then I will be happy and will (hopefully) never
need to raise the issue of coding style again. I have asked in the past to
change the style, but met with opposition, I believe the wording of my
proposition above is flexible enough to satisfy myself and others without
opening the doors to complete corruption of the existing code-base. Please feel
free to propose further changes to my text, but do not dismiss out of hand my
proposition as I believe that the majority of vtk developers are capable of
coping with different styles providing they are consistent. In general very few
vtk users (or indeed developers) study the source code in great depth for
modules other that those that they are making use of heavily, (and have
problems with). I find it acutely painful to reformat code that may be
thousands of lines long into a style that I don't like, for nobody's benefit.<br>
<br>
NB : One possible addition to my proposal might be that modules deviating from
the standard vtk style should contain a disclaimer<br>
"This class uses a different coding style to the vtk standard, please pay
careful attention to code layout when debugging"<br>
<br>
yours<br>
<br>
JB<br>
<br>
<o:p></o:p></span></font></p>
<pre><font size=2 color=black face="Courier New"><span style='font-size:10.0pt'>-- <o:p></o:p></span></font></pre><pre><font
size=2 color=black face="Courier New"><span style='font-size:10.0pt'>John Biddiscombe, <a
href="email:biddisco">email:biddisco</a> @ cscs.ch<o:p></o:p></span></font></pre><pre><font
size=2 color=black face="Courier New"><span style='font-size:10.0pt'><a
href="http://www.cscs.ch/about/BJohn.php">http://www.cscs.ch/about/BJohn.php</a><o:p></o:p></span></font></pre><pre><font
size=2 color=black face="Courier New"><span style='font-size:10.0pt'>CSCS, Swiss National Supercomputing Centre | Tel: +41 (91) 610.82.07<o:p></o:p></span></font></pre><pre><font
size=2 color=black face="Courier New"><span style='font-size:10.0pt'>Via Cantonale, 6928 <st1:place
w:st="on"><st1:City w:st="on">Manno</st1:City>, <st1:country-region w:st="on">Switzerland</st1:country-region></st1:place> | Fax: +41 (91) 610.82.82<o:p></o:p></span></font></pre></div>
</body>
</html>