There’s little point in teaching either functional or procedural programming, as they’ll both be more or less covered when you’re learning Object Oriented programming.
There’s nothing preventing certain functions from being procedural or functional.
Every time I see a post like this, or my comment get downvoted, I read the Wikipedia article again, and am forced to conclude that no, I still don’t appear to be wrong.
- Procedural programming: programming with procedures (e.g. functions)
- Functional programming: programming with only functions
- OO programming: programming with procedures and classes.
Procedures are not functions!
I can understand the confusion since both Java and OCaml will let you define both. Procedures have side-effects, e.g. mutating global state, (pure) functions don't. Functional programmers work with predominantly immutable values and this requires a very different style of programming - one that many people struggle with if they have not had much exposure to it. Functional programming languages also have syntax and abstractions (often taken from maths) that are not used in object oriented programming. Why program with functions and immutable data? It enables better composition.
There’s nothing preventing certain functions from being procedural or functional.