Connecting...

The Non-Programmers guide: Functional Programming vs Object Orientated Programming

W1siziisijiwmtkvmtevmtevmtuvmjyvmtcvntmzlzexlnbuzyjdlfsiccisinrodw1iiiwiodawedy1mfx1mdazyyjdxq

Joe Drewett Technology, Engineering

Functional Programming is the technique of programming stress, on an evaluation of functions, to develop the structure and elements of computer programs.

By using Functional Programming, language code threads result in the same values, regardless of the time or machine running the code thread.

This means they can be realized in any language, even one not designed with a default functional programming structure.

All of this enables an easier translation into an interactive environment, making the understanding of code easier... in theory!

The object-oriented technique works on the interactions of one or more objects.

An object being either method, a data structure, or a function.

Each of the created objects can be reused in the same programs and applications. This differs from functional programming, where it focuses on functions/behaviours.

The key differences between Functional Programming and OOP;

                1. Functional programming is used for performing many different operations for which the data is fixed, whereas Object-Oriented Programming is used for performing operations that have a common behaviour and different variants.

                2. Functional Programming's programming model is stateless, it doesn't track interactions.  Whereas Object-Oriented's is stateful (usually by tracking interactions by setting values in a storage field)

                3. In Functional Programming, a state does not exist. In Object-Oriented Programming, the state exists. You have state when you associate values - numbers, strings, complex data structures - to an identity and a point in time.

                4. In Functional Programming, a function is the primary manipulation unit. In Object-Oriented, an object is the primary manipulation unit.

Coming up next week: What is Java?

 

Sources: 

https://www.educba.com/functional-programming-vs-oop/

https://medium.com/@sho.miyata.1/the-object-oriented-programming-vs-functional-programming-debate-in-a-beginner-friendly-nutshell-24fb6f8625cc

https://www.codenewbie.org/blogs/object-oriented-programming-vs-functional-programming

 

The Non-Programmers Guide: Each week, I'll be breaking down my findings to questions like; What's the difference between Programming vs Scripting? What is the best programming language for learning Algorithms? What is Java?

I’ll be actively posting about this on my social. Please share any builds, corrections or share your experiences with these topics.

 

 

let's talk