POV-Ray : Newsgroups : povray.general : CSDL: C-like Simulation Description Language : Re: CSDL alpha 1 release Server Time
7 Aug 2024 07:18:54 EDT (-0400)
  Re: CSDL alpha 1 release  
From: Lutz Kretzschmar
Date: 24 Jan 2002 03:16:01
Message: <kagv4ukggo8ht4b09dsr08ff1kou8j335k@4ax.com>
Hi Warp, you recently wrote in povray.general:

>   It may be a standard way in Java. 
I wouldn't know, I've never written any. I've been doing C++ the last
7 years.

>   Making a module which allocates a resource, returns a handle to this
> resource outside and hopes that someone else will hopefully free it somewhere,
> is a *really* bad module design (and OO design).
Generally, I agree, but not in this case. And you failed to answer my
question. How do create a copy of an object to which you have a base
class pointer. As Thorsten said, since there are no virtual
constructors, you can't do it any other way. The design of the module
has nothing to do with this. The way the return value (the new object)
is handled is part of the module design. To make sure there are no
leaks.

> The whole class hierarchy should be designed so that this kind of copying
> is not needed (ie. not in this way). 
Very funny. There is no amount of design that can avoid this.

> Making efforts for a good design now can save you a lot of trouble later.
Now that I agree with :-)

- Lutz
  email : lut### [at] stmuccom
  Web   : http://www.stmuc.com/moray


Post a reply to this message

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