Procedural programming means coding the application is a series of tasks. Do A, then do B, then Do C. And often wrap these tasks in procedures or functions that can be easily called and run several times in the code.
Object Oriented Programming is also often done by doing A, then doing B, then doing C. But objects are used (and correct me if I’m wrong because I’m not sure) as sophisticated ways to store, manipulate and hide data. This affects significantly the design of the program. But the overall flow of the application is still do A, then do B, then do C.
Do you agree? If so, would you say that OOP is essentially a type of Procedural Programming?
0
Object Oriented languages are not required to be procedural, OCaml (or F#) is an Object Oriented language that is fundamentally functional.
Now most Object Oriented languages are imperative and procedural but possess features or frameworks that allows some Aspect / Behavioral / Functional programming inside them, in C# for instance you can use lambda and anonymous methods for functional programming, attributes (annotations) for declarative programming, and post-compilation IL modifications for Aspect programming.
Object Oriented languages is more a clarification on how data is encapsulated, not how the flow of control is programmed. Scala for instance supports both functional and procedural programming styles, where one may manually run a function on each item in a array through a loop
var arr = Array(<data>)
for(item <- arr) {
foo(item)
}
Or one could simply tell the array it should run the function
arr.foreach(foo)
OOP is encapsulating and separating code, which should allow better finding of bugs, and keeping bugs more confined.
Procedural is programming one thing after another, where in functional one would rather tell what should happen rather then the exact order that it should happen.
Maybe look at this question What exactly is procedural programming? How exactly is it different from OOP? Is it the same as functional programming?