POV-Ray : Newsgroups : povray.off-topic : code readability : Re: code readability Server Time
7 Sep 2024 09:24:54 EDT (-0400)
  Re: code readability  
From: stbenge
Date: 26 Jun 2008 15:47:59
Message: <4863f26f@news.povray.org>
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.

Since most of the code I write is never seen by another poor soul, you 
won't find me bending backwards to tailor it for the "posh" crowd.

> Why doesn't the rest of the world understand that?

I kinda feel bad for the one guy who had to see my C++ code. At least it 
was relatively short :)

Sam


Post a reply to this message

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