POV-Ray : Newsgroups : povray.pov4.discussion.general : Curly braces replaced by indentations but only as an option ? : Re: Curly braces replaced by indentations but only as an option ? Server Time
2 Apr 2025 20:42:28 EDT (-0400)
  Re: Curly braces replaced by indentations but only as an option ?  
From: Kenneth
Date: 19 Mar 2025 14:05:00
Message: <web.67db06277e3c5a99e83955656e066e29@news.povray.org>
"Mr" <m******r******at_hotmail_dot_fr> wrote:
>
> What if in POV 4
> we had the possibility to use spaces or tabs as a synonym to what curly braces
> currently do, but we could still use those braces themselves ?
>

If spaces and tabs were to suddenly have real meaning in POV 4, and depending on
how we each write POV code-- the layout of the text-- it could break all of our
old scenes, going back decades.

For example, I personally write code with tabbed indents, just to make the
various constructs clear in my mind. Like...

sphere{0,1
     texture{
          pigment{rgb 1}
          finish{...}
            }
     normal{...}
      }

This is especially helpful to me in very complex scenes. (Others here probably
have their own ways of writing such stuff.)

If those tabs or spaces were to take on a syntactical importance going forward,
it would wreak havoc with old scenes. Chaos! :-(

Personally, I have always liked the fact that POV-ray's SDL syntax did not
impose any meaning on tabs or spaces; it would have been one more 'layer of
abstraction' to add to the learning of the syntax, in my opinion. I am not a
'programmer' in the strict sense, though, so I don't know how other languages'
syntax rules make it easier or harder for beginners to learn those languages.
POV's syntax 'made sense' to me from the get-go.


Post a reply to this message

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