[vtk-developers] PROPOSAL: Changing VTK's indentation style
David Lonie
david.lonie at kitware.com
Wed Sep 9 09:22:37 EDT 2015
Well, if we're changing it anyway...
I'd prefer
void func()
{
if (...) {
...
}
else {
...
}
}
Less wasted vertical space = more code on the screen, and it's a common
style with great editor support. I've always been a fan of the Qt coding
style.
https://wiki.qt.io/Qt_Coding_Style
That said, either would be fine with me.
Dave
On Wed, Sep 9, 2015 at 9:14 AM, David E DeMarle <dave.demarle at kitware.com>
wrote:
> +1
>
>
>
> David E DeMarle
> Kitware, Inc.
> R&D Engineer
> 21 Corporate Drive
> Clifton Park, NY 12065-8662
> Phone: 518-881-4909
>
> On Wed, Sep 9, 2015 at 9:08 AM, Berk Geveci <berk.geveci at kitware.com>
> wrote:
>
>> Hi folks,
>>
>> What would you think of changing VTK's indentation style from:
>>
>> if ()
>> {
>> // ..
>> }
>>
>> to
>>
>> if ()
>> {
>> // ...
>> }
>>
>> ?
>>
>> Our current style (modified Whitesmiths I am told) is used only by very
>> few projects,
>> mostly related to VTK ones (ITK, CMake). It is poorly supported by some
>> of the newer editors
>> that are widely popular (Sublime, TextMate etc.) and IMO foreign to the
>> new generation
>> C++ developers.
>>
>> The style I propose is modified Allman style - with indentation changed
>> from 4 to 2 spaces.
>> It is much more common.
>>
>> If approved by the community, we would change VTK wholesale. This should
>> not be
>> an issue for history as git blame/annotate can be told to skip white
>> spaces.
>>
>> Best,
>> -berk
>>
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Search the list archives at: http://markmail.org/search/?q=vtk-developers
>>
>> Follow this link to subscribe/unsubscribe:
>> http://public.kitware.com/mailman/listinfo/vtk-developers
>>
>>
>>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Search the list archives at: http://markmail.org/search/?q=vtk-developers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtk-developers
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20150909/10d32f30/attachment-0001.html>
More information about the vtk-developers
mailing list