FUNCTIONAL AND OBJECT-ORIENTED PROGRAMMING: KEY FEATURES AND DIFFERENCES

Pros and cons of Functional Programming vs Object-Oriented Programming

Functional programming vs object-oriented programming

Pillars of Object-Oriented Programming

  • Abstraction (hiding irrelevant information and keeping the core one)
  • Inheritance (the process of one class or object retaining the attributes of another class)
  • Encapsulation (prevention of unauthorized access to the unrelated data by hiding them)
  • Polymorphism (creation of a new entity by combining several elements)

Fundamentals of Functional Programming

  • First-class function (a function can be built in the runtime, passed as a parameter, returned, and even get assigned some value)
  • Higher-order function (can take functions as arguments and return the functions as values)
  • Pure function (take and return the same value as an input value without any modifications to the data)
  • An anonymous function (a function without a name usually utilized within a short period)
  • Recursion (allows writing concise algorithms based on the input data to the functions)
  • Persistent data structure (a data structure that keeps their previous version when undergoing modifications)
  • Non-strict (lazy) evaluation (an evaluation of a function is performed only when this function is called)

Summary

--

--

--

Custom software development company offering a wide range of IT Consulting, Web and Mobile development, Quality Management, BI and BigData services.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

WebGPU January 2022 meetup — takeaways

Deploy a production-mongodb cluster

Fundamental Git Commands

The spreadsheet war: Google Sheets vs. Microsoft Excel

O.O.P: Pleasant by Nature

Let’s build a basic Kotlin application

Configuring docker 🐳services using ansible.

Detailed explanation of MLDsnooping technology for IPv6 multicast

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Agiliway

Agiliway

Custom software development company offering a wide range of IT Consulting, Web and Mobile development, Quality Management, BI and BigData services.

More from Medium

Advantages and disadvantages of functional programming

Getting started with the PicoLisp database

Save $1 billion with the Option type

Understanding Maybe and Either in Functional Programming