POV-Ray : Newsgroups : povray.general : The Language of POV-Ray : Re: The Language of POV-Ray Server Time
11 Aug 2024 11:18:00 EDT (-0400)
  Re: The Language of POV-Ray  
From: Matt Giwer
Date: 13 Mar 2000 01:02:25
Message: <38CC8493.A5135501@ij.net>
Chris Huff wrote:

> In article <38C992EA.4C6238BD@ij.net>, Matt Giwer <jul### [at] ijnet>
> wrote:

> >       So what is the difference other than a different syntax? The 123
> > ways to create a loop? They all do the same thing in the end.
> > Even step = 3 with I=I+3.

> >       Introducing additional syntaxes raises more problems than it
> > solves. With one elementary syntax that can do everything there
> > isn't nearly as much to read and a hundred fewer places for
> > parser differences to creep in.

> The only difference is syntax. But that is a meaningful difference.
> Although a for loop could also be implemented as a while loop, it can
> sometimes be easier to write and understand if written as a for loop. 

	Actually I would say it is usually more famliar which makes it
appear easier to understand. 
 
> And what do you mean by "a hundred fewer places for parser differences
> to creep in"? I don't think the modifications would be very extensive,
> and there is only one parser.

	I mean implementation differences. On an i++ while you can get a
debate started among purists as to while i < 5 should bail out or
4 or 5 in that should the < be checked before or after evaluating
and changing the variables in the loop. 

	You can get another debate on permitting i to be both integer
and float. 

	This stuff may be OBE since the late 70s when was being paid to
look into it perhaps due to the dominance of C or the later
developments of Wirth after Pascal. 

> >       Next, complex conditional if then else statements. Can GOTO be
> > far behind?

> Umm, we have if-then-else statements. And switch statements. And goto is
> a bad idea for many reasons.

	Without GOTO all branches are conditional to another routine.
Permitting GOTOs to exist after falling out of a routine simply
because it is sequencial is what we called spaghetti code. If you
have GOTO you have unconditional GOTOs. 

	They are nasty little buggers when they show up in late night
sessions. Never want to meet on in the dark. 

-- 
A free internet for free minds.


Post a reply to this message

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