POV-Ray : Newsgroups : povray.programming : language design (was Re: hash marks) : Re: language design (was Re: hash marks) Server Time
28 Jul 2024 10:30:01 EDT (-0400)
  Re: language design (was Re: hash marks)  
From: Christopher James Huff
Date: 13 Mar 2002 11:43:12
Message: <chrishuff-37C011.11425013032002@netplex.aussie.org>
In article <3c8f298c$1@news.povray.org>,
 "Vadim Sytnikov" <syt### [at] rucom> wrote:

> If a language has an explicit pre-processing stage, then there is something
> wrong with the language itself. My point is that POV-Ray must not expose
> that to the user -- and hopefully get rid of such internal subdivision as
> well.

I don't think the mere presence of a preprocessor is a flaw in a 
language. And in this case, it is rather unavoidable...unless you want 
to re-evaluate the entire scene for each ray cast.
The POV-Ray control structures (macros, #if-else and #switch 
conditionals, #while loops) are more like preprocessor directives than 
language structures, and this gives them some very useful 
advantages--you can use them to generate scene code automatically, 
making a large number of objects in a union or initializing arrays. 
There isn't a separate pre-parse stage, but the scene parser doesn't see 
the loops and doesn't need to, it just needs to know objects and other 
scene attributes. After parsing, the scene is pretty static, it just 
gets rendered.

-- 
Christopher James Huff <chr### [at] maccom>
POV-Ray TAG e-mail: chr### [at] tagpovrayorg
TAG web site: http://tag.povray.org/


Post a reply to this message

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