|
|
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
|
|
|
|
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
|
|