POV-Ray : Newsgroups : povray.advanced-users : union of unions : Re: union of unions Server Time
29 Jul 2024 14:18:11 EDT (-0400)
  Re: union of unions  
From: Warp
Date: 10 Sep 2002 05:10:36
Message: <3d7db70c@news.povray.org>
Rune <run### [at] mobilixnetdk> wrote:
> Nope that's not the same for me. Why would it be more difficult to
> recognize a word than a starting bracket?

  Because of its peculiar shape.
  From a bunch of text you can distinguish a lot better a '{' than a word.

> 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.

  My point is that it's easier to spot that "something" if it has a peculiar
shape, like '{'.

> 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?

  *Anything* can be a lot of things and it may not always be clear which
of those things is the one you are looking for. It's easier to look for
something specific (ie. a '{') than looking for *anything*. Get my point?

> No, there are other reasons why it is good. It is equally* easy to read
> with regard to indention

  To me it's harder to read. You can't disprove that. :)

> and it is more compact

  Being more compact does not automatically mean it's better.
  If a code block is delimited by "empty" lines (not really empty, as the
line at the beginning as a { and the line at the end has a }, but as they
are the only characters at those lines, they look quite empty) it better
distinguishes the boundaries of a code block. That is, it's easier to see
where does the code block begin and where does it end.
  With the "more compact" style you don't see it as easily, as you only
have the indentation to act as a hint.

> 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.

  That's why people should use the better style.

-- 
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}//  - Warp -


Post a reply to this message

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