3 ms·
> I still don’t appear to be wrong. Procedures are not functions! I can understand the confusion since both Java and OCaml will let you define both. Procedures
by willtim 7y ago
> I still don’t appear to be wrong.
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.
- Aeolun 7y ago> Procedures are not functions https://en.m.wikipedia.org/wiki/Procedural_programming https://en.m.wikipedia.org/wiki/Procedural_programming I guess I just happen to be reading an article that doesn’t make any distinction. > Functional programming languages also have syntax and abstractions (often taken from maths) that are not used in object oriented programming. True, but this is nothing related to functional programming an sig.