|
|
In article <3A69BA2F.5FB74425@pacbell.net>, lin### [at] povrayorg
wrote:
> > and the source code is fully object-oriented ...
>
> If the source code is fully object-oriented...
The main reason to choose C++ as the language to rewrite POV 4.0 in,
would be to make using OOP concepts a lot easier to use. The current
source code has to mess around with function pointers in order to mimic
objects. You *could* do the same thing in C++, but there would be no
reason to do so...it just makes things unnecesarily difficult to modify.
For example, to add a proximity function in the current source, I would
have to modify the code for every shape...in C++ I would only have to
modify a small amount of code in the base shape and it would be
inherited by all of the other shapes.
I think it's safe to say that most of the reason for choosing C++ is to
allow making the source code fully object-oriented.
--
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
|
|