POV-Ray : Newsgroups : povray.general : Announcement: Moray acquired by POV-Ray; to be released as Open Source : Re: Announcement: Moray acquired by POV-Ray; to be released as OpenSource Server Time
14 Jun 2024 04:24:54 EDT (-0400)
  Re: Announcement: Moray acquired by POV-Ray; to be released as OpenSource  
From: Thorsten Froehlich
Date: 14 Feb 2007 06:04:26
Message: <45d2ecba@news.povray.org>
John VanSickle wrote:
> How far along is the conversion to C++ code?  I've been converting my
> modeler from C to C++, and I keep wincing at the evil code that I first
> wrote.

POV-Ray code has been C++ since 3.5 and required a C++ compiler since 3.6.

> I wonder how many times the POV-Ray coders look at something and say
> "Good lord, did *I* write that?"

Not the "I", but "anybody". Especially the lighting code was rather
revealing when it came to the "many cooks" problem. In same cases analysis
showed that perfectly logical looking code into which a lot of time went
maintaining it was either unreachable or conditions were always true. While
in many cases a compiler could probably have figured them out, they just
added to the complexity of the code. In other cases there were really
inefficient linear searches that were not needed at all.

Also, in particular the media code is known to not handle its interval
sorting efficiently, but lack of time did prevent us from rolling out the
replacement code because it had various funny bugs (that was why early media
in 3.7 did not work right). So what was done was simply adding the old
inefficient but flawlessly working code back. In fact, many such instances
in many places are the reason for the various strange bugs that did appear
in early betas. And they do take long to fix because usually the code does
work on the test scenes originally used to check the changes.

	Thorsten


Post a reply to this message

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