POV-Ray : Newsgroups : povray.general : State of the black_hole warp's type option? : Re: State of the black_hole warp's type option? Server Time
3 May 2024 00:53:17 EDT (-0400)
  Re: State of the black_hole warp's type option?  
From: clipka
Date: 9 Jul 2016 06:53:25
Message: <5780d7a5$1@news.povray.org>
Am 09.07.2016 um 00:46 schrieb William F Pokorny:

> I found this from 2002:
> http://news.povray.org/povray.beta-test/thread/%3C3c44167a@news.povray.org%3E/
> which looks like there was intent to remove the option from 3.5.

For the sake of backward compatibility, removing the option is not an
option (no pun intended).

> If 0 is the only valid option for type at present, but others are
> planned, should we warn in the parser when it is set to something other
> than 0? Perhaps also comment the conditional in the code on type to save
> a few cyles until other options exist ?

A warning might be in order, depending on whether we label the setting
as obsolete (in which case we should warn) or intended for future
extensions (in which case we probably shouldn't warn, except maybe if
the user specifies a value other than the supported value of 0).

As for the conditional, if we go for the "future extension"
interpretation I suggest replacing it with a switch() and making it the
default branch. This way we keep the logic there, but make it easy for
the compiler to optimize it away. (If we do that, we should add a
warning to the parser if a value other than 0 is specified, as the
behaviour will change.)

> No matter the answer(s) supposing the documentation should be updated to
> match.

True.


Post a reply to this message

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