John, On Sunday 17 April 2005 12:31, John Lamb wrote:
...
I believe object-oriented programming developed from an algol based language called Simula in the 1960s. Simula was designed for discrete event dimulation and object-oriented languages are very good for this purpose - I first looked at object oriented languages when I found that FORTRAN was almost useless for discrete event simulation in the late 1980s: no function pointers means you have to use hard-coded tables to find which function actually needs to be called at runtime even though you end up writing dozens of functions with identical parameter lists.
Simula is acknowledged by Stroustrup as a key conceptual source in his invention of C++. However, Object-Oriented programming is generally thought to have been originated with Smalltalk, a Xerox PARC invention, and not sharing a lineal link with Simula.
One thing that irritates me is people insisting on using object oriented programming even when it's clearly not appropriate. Some things are best just done procedurally or recursively. Many algorithms work much better and faster when the polymorphism is resolved at compile time rather than run time - so use templates. My view is: use the method that is appropriate for the task and the language that is appropriate for the method.
And there are alternatives beyond O-O and procedural. There's functional programming, Aspect-Oriented programming, logic programming, constraint programming and probably lots of techniques about which I know nothing. C++ programmers have it better than most in that they have more ability to mix and match techniques and to take or leave the O-O capabilities of the language. James O. Coplien has a book called "Multi-Paradigm Design for C++" (http://www.amazon.com/exec/obidos/ASIN/0201824671/) and it addresses your very point: that one should choose a design and coding technique that is deliberately chosen to be a good match for the requirements of the problem(s) you must solve and the requirements you must fulfill.
-- JDL
Randall Schulz