POV-Ray : Newsgroups : povray.off-topic : Hypothesis: OO does nothing for reusability : Re: Hypothesis: OO does nothing for reusability Server Time
7 Sep 2024 09:24:21 EDT (-0400)
  Re: Hypothesis: OO does nothing for reusability  
From: Darren New
Date: 21 Aug 2008 15:41:39
Message: <48adc4f3$1@news.povray.org>
Warp wrote:
>   The two main aspects of OOP are modularity and inheritance. Modularity
> is a hugely useful paradigm, but inheritance, while sometimes useful, was
> not after all the panacea it was supposed to be. Practice has diminished
> the importance of inheritance as a tool quite a lot in the past ~20 years.

I think that's basically what my original premise was to be. Well stated.

>   Of course the definition of "generic programming" can be a bit fuzzy.
> Perhaps it could be argued that C++ template metaprogramming and Haskell
> functional programming are both different approaches at generic programming.
> In general it could be said, perhaps a bit simplistically, that generic
> programming is a way to write algorithms which will work for (almost)
> any data type which meets certain criteria, without the algorithm having
> to explicitly know what the data type in question is. In OOP this has
> classically been achieved through inheritance, but generic programming is
> often even more powerful and expressive than that (and often leads to
> faster and more efficient code, both speedwise and memorywise).

I'll grant you that.  I think there are also paradigms (like what folks 
call communication-oriented programming, or functional programming, or 
"component-oriented programming", or etc) that do a better job without 
being overhyped.

-- 
Darren New / San Diego, CA, USA (PST)


Post a reply to this message

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