POV-Ray : Newsgroups : povray.off-topic : Lots of statistics : Re: C# Server Time
29 Jul 2024 16:26:56 EDT (-0400)
  Re: C#  
From: Darren New
Date: 18 Aug 2012 00:28:41
Message: <502f19f9$1@news.povray.org>
On 8/15/2012 17:13, clipka wrote:
> You're presuming here that GUI item superclasses keep growing new functions.
> That's not a necessary prerequisite for a GUI library though.

No. It's just that *that* is one of the use cases that OO was intended to 
solve. Of course if you're sure you're never going to have new superclass 
methods, or that you're willing to update every subclass every time you add 
one to the superclass, then you don't need inheritance. But having that 
break between superclass and subclass, and between sibling subclasses (so 
you can add a new subclass without changing every reference to a superclass 
method to include a new case for that new subclass) is exactly the point of 
dynamic dispatch.

>> I don't know of any language that implements inheritance and interfaces
>> that doesn't allow interfaces to inherit. Quite honestly, that would
>> make almost no sense.
>
> I totally agree that it's a good choice to not design a language that way.
> But still, even with such a language you /could/ write a GUI library.

I can write a GUI library in assembler. Or in C, faking OO. Or in C, not 
faking OO. That doesn't mean it's easy.

-- 
Darren New, San Diego CA, USA (PST)
   "Oh no! We're out of code juice!"
   "Don't panic. There's beans and filters
    in the cabinet."


Post a reply to this message

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