|
|
Axel Baune wrote:
>
>[Snip]
>Another problem will be the
> 'dirty' programming for people without programming-knowledge. The
> example given by PoD is one of them:
dirty programming?
>
> 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?
The same as it would be using a while 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.
Then use a while loop and nothing is lost, except that you've made your
script hard to read. There's probably an easier way to do it using
for()
>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).
See answer to 2
PoD.
Post a reply to this message
|
|