POV-Ray : Newsgroups : povray.general : The Language of POV-Ray : Re: The Language of POV-Ray Server Time
10 Aug 2024 03:25:47 EDT (-0400)
  Re: The Language of POV-Ray  
From: Axel Baune
Date: 9 Mar 2000 08:07:59
Message: <38C7A263.EBD95C44@neuro.informatik.uni-ulm.de>
Hello,

As a programmer I have to say that the flexibility of PoV-Script is one
thing I like most in PoV. As Ken already mentioned, mostly you can write
your scene intuitively, without to be bound to strict and exact rules
for a description of an object an object or attribute of an object. This
is great! In (other) programming languages (Yes I think PoV-Script is
already a kind of programming language, however a very flexible) you are
often pressed use very strict, limited and exact rules to archive the
wanted effect, which in turn you sometimes doesn't know exactly enough
to code them without looking into any help. Another problem will be the
'dirty' programming for people without programming-knowledge. The
example given by PoD is one of them:     

PoD wrote:
> 
> Some aspects of the language which relate purely to programming could be
> changed or (probably better) extended without affecting those who don't
> use them.
> 
> For a non-programmer or a programmer , macros, loops etc are a lot
> harder in POV than the equivalents in most programming languages.
> 
> Surely replacing
>   #declare I=1; #while(I<=5) ... #declare I=I+1;#end
> with either
>   for I = 1 to 5 {...}
> ala Basic, or even for a non-programmer,
>   for( I=1; I <= 5; I=I+1){...}
> would make life easier for all.

No I think not that this would make life easier for all. Problem one:
what will be the value of the variables outside the for-loop? Problem
two: What if you want to increment the variable in non deterministic
steps, e.g. different steps width in each loop or you didn't want to
increment in each loop. Than you will need the old while-construct, and
why blowing up Pov-Script with higly specialised commands if you already
have flexibler and more general commends for them? As a more skilled
programmer you can always write macros for specialised problems. Problem
three: What if somebody changes the variable explicitly inside the
loop-body. I think these problems complicates the life of PoV-people
without programming-knowledge, especially if some of these persons want
to understand code from other people with more skilled
programming-knowledge (especially if those people used 'dirty' and
mostly undocumented programming constructs). 

Yours,
Axel Baune


Post a reply to this message

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