POV-Ray : Newsgroups : povray.advanced-users : union of unions : Re: union of unions Server Time
29 Jul 2024 14:15:07 EDT (-0400)
  Re: union of unions  
From: Rune
Date: 9 Sep 2002 19:10:19
Message: <3d7d2a5b@news.povray.org>
Warp wrote:
>   I don't know about you, but to me it's easier
> to spot an opening bracket at the same column as
> the closing one I'm looking the pair for, than
> distinguishing that some word is at the same column
> (specially when there are several blocks one inside
> another).

Nope that's not the same for me. Why would it be more difficult to
recognize a word than a starting bracket?

But really, the whole point of indention is that you *don't* need to
recognize any symbol or words in order to get an overview of the
structure. You simply need to notice that there is *something* at the
same indention level.

If you see a closing bracket and want to find the start of the block,
you simply scan upwards until you hit *anything* that is on that
indention level. So why does it make any difference what it is?

>   Have you actually looked at the documentation?
> For example look at the primitives documentation (6.5).
> About half of the examples are indented in one way and
> the other half in the other way.

Maybe so. But when you look at both the demo scenes and documentation, I
still think that my statement is correct, if we count in lines of code
(even though your indention method take up more lines!)

>   Even if "the vast majority" of people use that
> indentation style, that doesn't automatically make it good.

No, there are other reasons why it is good. It is equally* easy to read
with regard to indention, and it is more compact (without being
cluttered in any way), which mean that you can see more code in the same
view.

* at least we can't prove with objective arguments if one is easier to
read than the other.

But even if we assume that the two styles are equally good, it will
still make life easier for coders if most people used the *same* style
rather than different styles.

Rune
--
3D images and anims, include files, tutorials and more:
rune|vision:  http://runevision.com (updated Sep 8)
POV-Ray Ring: http://webring.povray.co.uk


Post a reply to this message

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