POV-Ray : Newsgroups : povray.general : feature request (regarding &,|) : Re: feature request (regarding &,|) Server Time
8 Aug 2024 16:21:24 EDT (-0400)
  Re: feature request (regarding &,|)  
From: Chris Huff
Date: 17 Nov 2000 18:34:29
Message: <chrishuff-5D818F.18344617112000@news.povray.org>
In article <3a154839@news.povray.org>, Warp <war### [at] tagpovrayorg> 
wrote:

>   Actually, doing it C-like can produce faster parsing:
> 
>   #if(a>0 & extremely_long_calculation(a)) ...
> 
>   If a<=0 then the extremely_long_calculation() macro is not called, 
> saving potentially a lot of time.

If that extremely_long_calculation sets up some variables for later use, 
not evaluating it could lead to obscure bugs in scene files. Having side 
effects like this may be bad style, but having them be ignored sometimes 
would lead to problems that are very difficult to track down when they 
are done.

In other words, it is a minor optimization that can be done within the 
scene language and produces the possibility for bugs that are extremely 
difficult to track down(or code that is very vague because it relies on 
this optimization). Not worth adding in my opinion.

-- 
Christopher James Huff
Personal: chr### [at] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/

<><


Post a reply to this message

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