|
|
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
|
|