POV-Ray : Newsgroups : povray.programming : Object oriented POV scene language? : Re: Object oriented POV scene language? Server Time
28 Jul 2024 14:30:23 EDT (-0400)
  Re: Object oriented POV scene language?  
From: Chris Huff
Date: 23 Jul 2000 22:21:11
Message: <chrishuff-672541.21215023072000@news.povray.org>
In article <B5A0E746.17FD%dav### [at] maccom>, David 
<dav### [at] maccom> wrote:

>     Yes, what a mean is the SOURCE CODE would be object-oriented.
>     Now, how can you get OOP is C?

Uh, ever hear of structs?
One example is the way POV handles objects, the struct for each shape 
has a bunch of function pointers for shape-specific tasks, so it usually 
doesn't have to care about what kind of object it is.
BTW, C++ originally was translated to plain C...C is capable of 
everything C++ is, you just have to do more work to get it done.


> > Well, perhaps inheritance and dynamic binding could have some uses 
> > in the povray scripting language, but do you really think it's 
> > worth the efforts?
>     Yes, I think it would be, if only for the sake of TRUE OOP.

Well, to do something just for the sake of doing it isn't usually the 
best way to go about designing things...


>     And by fully OOP, I mean in APPLICATION, more then concept.

Well, inheritance would be like this: each copy of the object gets 
copies of the originals members, unless it is overridden. I doubt 
multiple inheritance would be that useful, but you could add a keyword 
to do so. Private, protected, and public members wouldn't be necessary 
for this, everything would be public. You would just be adding unneeded 
complexity otherwise.
And I don't think different types of binding even make sense in the POV 
language...

-- 
Christopher James Huff - Personal e-mail: chr### [at] maccom
TAG(Technical Assistance Group) e-mail: chr### [at] tagpovrayorg
Personal Web page: http://homepage.mac.com/chrishuff/
TAG Web page: http://tag.povray.org/


Post a reply to this message

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