Procedural:
- The output of a routine does not always have a direct correlation with the input.
- Everything is done in a specific order.
- Execution of a routine may have side effects.
- Tends to emphasize implementing solutions in a linear fashion.
Functional:
- Often recursive.
- Always returns the same output for a given input.
- Order of evaluation is usually undefined.
- Must be stateless. i.e. No operation can have side effects.
- Good fit for parallel execution
- Tends to emphasize a divide and conquer approach.
- May have the feature of Lazy Evaluation.
Published by L.P.D.S.Senevirathne
I am Damindu Senevirathne and currently I'm following B.Sc (Hons) IT degree program in Sri Lanka Institute of Information Technology.
View all posts by L.P.D.S.Senevirathne