POV-Ray : Newsgroups : povray.advanced-users : Object Oriented POV code : Re: Object Oriented POV code Server Time
29 Jul 2024 08:10:40 EDT (-0400)
  Re: Object Oriented POV code  
From: Christopher James Huff
Date: 23 Feb 2004 22:32:43
Message: <cjameshuff-391F89.22332723022004@news.povray.org>
In article <4039dada@news.povray.org>, Warp <war### [at] tagpovrayorg> 
wrote:

> > I never said anything about two class types...I have no idea how you're 
> > reading what I'm trying to say. 
> 
>   I can't see interfaces as anything else than very limited classes.

Because you're stuck in thinking about things in terms of C++...I think 
it'd help you to learn a few more object-oriented languages.


>   For example, in Java I see two types of classes: The regular ones
> and the extremely limited ones which they call "interfaces".
>   What I wonder is why have two types of classes like this when just
> one type suffices? IMO interfaces cause more problems than they avoid.

Like? And don't say anything about the lack of default implementations, 
that's Java-specific. I'm talking about the concept of interfaces in 
general. I see it as being much like structured programming...rather 
than one construct that can do anything with complex enough code, you 
have restricted constructs that do specific jobs. It makes the intent of 
the code clearer, and makes the language easier to learn and understand, 
IMO at least. I also think languages should make more use of delegation 
and composition...


>   Can you present a good example?

At the moment, no. Nothing other than diamond inheritance, anyway. I'll 
try to get a good example...

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: <chr### [at] tagpovrayorg>
http://tag.povray.org/


Post a reply to this message

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