POV-Ray : Newsgroups : povray.off-topic : Hypothesis: OO does nothing for reusability : Re: Hypothesis: OO does nothing for reusability Server Time
7 Sep 2024 03:19:54 EDT (-0400)
  Re: Hypothesis: OO does nothing for reusability  
From: Warp
Date: 20 Aug 2008 16:07:05
Message: <48ac7969@news.povray.org>
Darren New <dne### [at] sanrrcom> wrote:
> (I count 
> "reuse" as the ability to take code already written and use it in ways 
> not anticipated when it was written.)

  Maybe your definition of "reusability" is different than what it's really
meant.

  IMO a reusable component is one which you can take out of the original
program it was developed for, and use it (usually for the same purpose)
in a different program.

  Of course a generic library is reusable by definition (because it has
not been developed for a specific program, but to be reusable in all kinds
of programs). However, what OOP advertises is that, when you are developing
a program, if you design your objects properly, there's a high chance that
those objects will not be completely tied to that specific program, but can
be reused in other programs as well.

  What does OOP in particular bring to the whole reusability concept?
It brings the concepts of encapsulation, abstraction and (minimal)
interfaces. When properly implemented, these concepts aid in making a
module reusable (ie. not tied to a specific program).

  That doesn't mean other programming paradigms wouldn't support those
same concepts. It's just that OOP has been designed with those concepts
as the main starting points.

  (Whether the OOP paradigm has completely succeeded in this goal is open
to debate, but IMO it has succeeded pretty well, even if not perfectly.)

-- 
                                                          - Warp


Post a reply to this message

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