POV-Ray : Newsgroups : povray.unofficial.patches : MegaPov 0.4, macros trouble : Re: MegaPov 0.4, macros trouble Server Time
2 Sep 2024 18:15:38 EDT (-0400)
  Re: MegaPov 0.4, macros trouble  
From: Nieminen Juha
Date: 4 Feb 2000 04:00:03
Message: <389a9513@news.povray.org>
Jon A. Cruz <jon### [at] geocitiescom> wrote:
:> I think this belongs in the "For your information" thread, as it's a
:> religious battle.  FWIW, the indenting style above is at least as accepted
:> as the one you're advocating, for the simple reason that it lets you fit
:> more code in a screenful without sacrificing much in the way of readability.

: Also, some argue that the lining up of closing braces with the opening brace
: might be not as readable as lining it up with the construct that had the body.
: i.e. the closing brace closes the 'if' not the '{'. So for many it is more
: readable. Of course, if you also have the practice of always using braces, this
: is more true.

  Of course both are lined. In this way:

  if(whatever)
  {
      command1();
      command2();
      command3();
      command4();
  }

  I seriously have trouble seeing where does the block begin and which command
does it belong to if the opening brace is at the end of the previous line.
I sometimes have to read code made that way and it takes a lot longer to
see and understand.
  I'm so accustomed to that format which I cited above that I almost
immediately see the beginning and ending of the block and the command which
it belongs to.
  Of course someone else may be accustomed to the other way. However, I have
serious difficulties interpreting that kind of code. This is specially true
when there are several nested and consecutive blocks with several lines of
code in each block.

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

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