POV-Ray : Newsgroups : povray.programming : POV-Ray C++? : Re: POV-Ray C++? Server Time
26 Apr 2024 03:07:31 EDT (-0400)
  Re: POV-Ray C++?  
From: Thorsten Froehlich
Date: 2 Jan 2012 12:55:32
Message: <4f01ef94@news.povray.org>
On 02.01.12 15:12, MiB wrote:
> Looking at the POV-Ray 3.7 sources I noticed that it extensively uses the
> object-oriented C++ standard library (e.g. std::string, std::vector, ...).

Yes, all new code uses it. And I have some work done to at least get rid of 
C memory management that isn't in 3.7.0 RC.

> However, a quick survey reveals POV-Ray itself is not written in a contemporary
> object-oriented style; a lot of pointers to structs are handed around, functions
> manipulating data structures are on a global level and not members of classes.

It isn't object-oriented in the C++ way, that is true. It is contemporary C 
though.

> I assume this is due to the C language heritage handed down from the olden DKB
> Trace days.

Yes.

> Are there any plans or maybe even actual activity to redesign/refactor POV-Ray
> into a class based design? I am aware, this is no trivial work, and there may be
> reasons why a class redesign my be shunned here (worries about compatibility,
> performance, to mention a few). I am asking to reconsider these worries, if any.

No, the reason is simple: To get 3.7 started required a lot of work - about 
10 person-month full time over about 4 month, plus some additional work. 
This was kindly supported by AMD, and made possible because Chris Cason had 
no other major contract work at the time, and I as the other developer had a 
whole semester worth of spare time before starting my actual PhD work. When 
Christoph Lipka did the radiosity rework, he also had the time to do it.

Without this block of time and at least two people full-time (to pick up the 
slack its essential!), development doesn't go that fast. Add to that the 
years of time Chris and I had to spend on a legal battle for POV-Ray (which 
has the nice side effect that we have all the author rights sorted now), 
development suffered.

And last but not least, Chris is busy with contracts, and I have a full-time 
job, too. As do all the other POV developers.

> There is a very noticeable tendency of C++ compilers converging to a common
> standard, especially in regard to the new C++11 standard. Before, even popular
> compilers (say, VC++6) felt like implementing different languages. Now its
> different.

That is no concern.

> I am convinced, the POV-Ray development would profit a lot by introducing a
> class based design, maybe it would also be a good idea to start with an UML
> architectural model before attempting any code changes in this direction. A
> fresh wind in POV-Ray development may result. Correct me if I am wrong, but
> POV-Ray seems to be stagnant for years already.

Quite a bit goes on beyond 3.7, and it isn't so much a problem do come up 
with a proper design. But a design is worthless if it cannot be implemented 
straight out. To do this part-time is next to not feasible. If there was 
some funding for two or three of the current core developers for just tree 
to four months, we would be up and running within that time. Plus a 
lead-time of half a year to have the time on hand, of course.

	Thorsten


Post a reply to this message

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