POV-Ray : Newsgroups : povray.general : CSDL: C-like Simulation Description Language : Re: CSDL alpha 1 release Server Time
7 Aug 2024 09:22:50 EDT (-0400)
  Re: CSDL alpha 1 release  
From: Warp
Date: 23 Jan 2002 16:54:21
Message: <3c4f310d@news.povray.org>
Christopher James Huff <chr### [at] maccom> wrote:
: Having to duplicate essentially the same code for every subclass (for a 
: Copy() function) just so I can make a copy of an object from a 
: base-class pointer.

  I'm not completely sure what you are talking about, but that sounds a bit
like very dubious coding.
  Do you mean that your Copy() method allocates dynamically a new instance
of its own type, copies itself to it and then returns a pointer to this new
instance?
  That really badly breaks modular OO design.

: Having to return void pointers and cast them to the 
: correct types.

  I never have to do this. It also breaks badly modular OO design.

: Mostly having what I can do with an object being 
: determined by the type of pointer to it I have, instead of what the 
: object can do.

  I don't understand this one.
  Are you sure you fully understand object-oriented design?

  You are also talking too much about pointers. Sounds like you are using
pointers for almost everything.
  This is C++, not Java. Here you can use true references and local instances,
true member instances. You don't need to use dynamic allocation for everything,
as in Java (in fact, it's usually a good idea to not to use it unless it's
justified).

: Templates.

  What about them?

-- 
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}//  - Warp -


Post a reply to this message

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