2 ms·
Most OO programs ARE procedural. (eg. Anything written in Java/C#/C++) OO does not eliminate procedural code, it merely encapsulates it.
by fleitz 16y ago
Most OO programs ARE procedural. (eg. Anything written in Java/C#/C++)
OO does not eliminate procedural code, it merely encapsulates it.
- arethuza 16y agoAs with all discussions of this type it abounds with false dichotomies - as you say all OO programs contain an element of procedural code and it is pretty difficult to avoid objects and classes completely if you use a language where they are the primary means of data and procedural abstraction.
- wladimir 16y agoYes I meant "procedural-only, pre-OO". A lot of C software (one example: glib, as used by GNOME) these days is also OO, without any language support. OO is about encapsulation, seperation of concerns, and so on, generally resulting in more readble code. Of course it can be overdone. I've also seen software more like OO-extremism, in that it was almost impossible to see what called what, or how the loosely-knit bunch of objects, interfaces, abstractions managed to do anything at all. Eclipse has a few projects guilty of this.