POV-Ray : Newsgroups : povray.off-topic : code readability : Re: code readability Server Time
7 Sep 2024 15:24:21 EDT (-0400)
  Re: code readability  
From: Mike Raiford
Date: 26 Jun 2008 15:56:34
Message: <4863f472$1@news.povray.org>
stbenge wrote:
> Halbert wrote:
>> I, for one, find it much easier to read C++ code which is braced like 
>> this:
>>
>> if(somecondition == 0)
>> {
>>     // do some stuff
>> }
>> else
>> {
>>     // do something else
>> }
> 
> I, for more than one, do not.
> 
>> As opposed to
>>
>> if(somecondition == 0) {
>>     // do some stuff
>> }
>> else {
>>     // do something else
>> }
> 
> To me, the latter method is much more like POV-Ray than the first 
> method. I learned POV first, so I guess that's why I do it.
> 

I learned POV first, too. But for C/C++ code, the second example seems 
foreign. I much prefer the first example.

But it's kind of like saying you prefer a room painted hunter green, 
while I'd prefer forest green.

The only thing I'll say is that if there are coding standards in place, 
follow the standard your organization uses.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.