POV-Ray : Newsgroups : povray.off-topic : Hypothesis: OO does nothing for reusability Server Time
10 Oct 2024 08:19:53 EDT (-0400)
  Hypothesis: OO does nothing for reusability (Message 21 to 22 of 22)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Darren New
Subject: Re: Hypothesis: OO does nothing for reusability
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

From: Chambers
Subject: Re: Hypothesis: OO does nothing for reusability
Date: 25 Aug 2008 02:59:49
Message: <48b25865$1@news.povray.org>
I always thought the benefits of OO were in design, rather than 
reusability.  After all, it's one thing to simplify the design of a 
complex system and save months of work in the process; OO can do this 
quite well.  It's another to combine a "BigInt" class with a "Complex" 
class.  OO doesn't necessarily help in this situation (although it can).

...Chambers


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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