Quote:
| Originally Posted by iani Object oriented programming: do you find it reflects "natural thinking" or do you consider it to be artificial? |
Natural thinking makes for bad programs.
Object Oriented stuff just tries to focus on the data structures and attach processes to manipulate them in close. It is one tool in the programmers toolbox but it can be just as easily done to death as any one-fits-all methodology. Its advantage is that you can treat the data-and-routines like a black box and not have to worry about what goes on inside. A well designed OOP lump can be reused from its description without ever 'going inside'. This can, if handled properly, save time = money.
The big problem with most OO programming is that things spend their CPU time moving numbers on and off stacks and nesting calls through layers and layers of redirection just to return a pointer.
If there are 15 of you working on a project OO make the design stage harder but the implementation easier and you probably won't notice it is slow. If I want to reuse predesigned or library stuff OO can save me time as all I am doing is stitching stuff together. However if you ask why does my 3GHz PC running XPpro run slower than the 100MHz machine I had a few years ago it is all that OO stuff burning the mill time.
I have two jobs on the desk at the moment. One involves multiple users running machine tools and tracking conforming/non-conforming materials and looks like OOP and SQL from here and the other is a test jig fixture that is going to be linear code assembler. Neither could use the other technique so I don't get much choice.
I've rambled about a bit... was that relevant?