Breaking News: Grepper is joining You.com. Read the official announcement!
Check it out

3 Programming Paradigms

Pragya Keshap answered on February 7, 2023 Popularity 5/10 Helpfulness 1/10

Contents


More Related Answers

  • programming paradigm
  • imperative paradigm vs declarative paradigm
  • Do you really need the Reactive paradigm for application development?
  • Are there any disadvantages to using the Reactive paradigm?
  • A Multi-Paradigm Programming Language#
  • database paradigms

  • 3 Programming Paradigms

    0

    Structured programming vs. OO programming vs. Functional programming

    Structured programming is discipline imposed upon direct transfer of control.

    Testability: software is like science: Science does not work by proving statements true, but rather by proving statements false. Structured programming forces us to recursively decompose a program into a set of small provable functions.

    OO programming is discipline imposed upon indirect transfer of control.

    Capsulation, inheritance, polymorphism(pointers to functions) are not unique to OO.

    But OO makes polymorphism safe and convenient to use. And then enable the powerful ==plugin architecture== with dependency inversion

    Source code denpendencies and flow of control are typically the same. However, if we make them both depend on interfaces, dependency is inverted.

    Interfaces empower independent deployability. e.g. when deploying Solidity smart contracts, importing and using interfaces consume much less gases than doing so for the entire implementation.

    Functional programming: Immutability. is discipline imposed upon variable assignment.

    Why important? All race conditions, deadlock conditions, and concurrent update problems are due to mutable variables.

    ==Event sourcing== is a strategy wherein we store the transactions, but not the state. When state is required, we simply apply all the transactions from the beginning of time.

    https://www.makeuseof.com/programming-paradigms-major/

    Popularity 5/10 Helpfulness 1/10 Language java
    Source: Grepper
    Tags: java paradigms
    Link to this answer
    Share Copy Link
    Contributed on Feb 07 2023
    Pragya Keshap
    0 Answers  Avg Quality 2/10


    X

    Continue with Google

    By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
    X
    Grepper Account Login Required

    Oops, You will need to install Grepper and log-in to perform this action.