Procedural vs Functional Programming

StatuesqueEarth avatar
StatuesqueEarth
·
·
Download

Start Quiz

Study Flashcards

18 Questions

Which programming paradigm structures the code around procedures, routines, or subroutines?

Procedural programming

In which programming style are pure functions applied in sequence to solve complex problems?

Functional programming

Which programming paradigm emphasizes describing the desired outcome or result, rather than specifying step-by-step processes?

Declarative programming

Which programming style mainly focuses on what to solve and uses expressions instead of statements?

Functional programming

Which programming paradigm allows you to state what you want to be done without specifying the step-by-step process of how to achieve it?

Declarative programming

In which style of programming will the entire program be built using classes and objects?

Object Oriented Programming

Which programming paradigm focuses on describing how a program operates by giving a sequence of statements that change a program’s state?

Procedural programming

Which programming paradigm emphasizes expressions rather than statements and avoids changing state and mutable data?

Functional programming

Which programming paradigm treats computation as the evaluation of mathematical functions and avoids changing-state and mutable data?

Functional programming

Which programming paradigm focuses on specifying what to do rather than how to do it, using expressions or declarations to define the desired outcome?

Declarative programming

Which programming paradigm involves designing programs around objects that interact with each other, emphasizing encapsulation, inheritance, and polymorphism?

Object-oriented programming

Which type of programming paradigm provides developers with a set of detailed instructions to execute in a given order?

Procedural programming

Which type of programming language is designed to be closer to natural language and provide a higher level of abstractions?

Declarative programming

Why is language design important in the field of computer science and programming?

To influence how software is written, understood, and maintained

Which generation of programming language is SQL (Structured Query Language) associated with?

4th generation

What feature of a well-designed programming language allows developers to express complex ideas concisely?

Expressive syntax and semantics

Which type of programming focuses more on solving problems and less on the intricacies of hardware?

Declarative programming

What does SAFETY AND SECURITY in language design refer to?

Memory safety and built-in security mechanisms

Study Notes

Programming Paradigms

  • A programming paradigm is a fundamental style or approach to programming that encompasses a set of principles, concepts, and practices for designing and structuring computer programs.
  • It provides a framework for developers, consisting of certain structures, features, and opinions about how common programming problems should be tackled.

Types of Programming Paradigms

  • Procedural Programming: a derivation of imperative programming that adds the feature of functions, also known as “procedures” or “subroutines”.
  • Functional Programming: a declarative paradigm that applies pure functions in sequence to solve complex problems, focusing on what to solve and using expressions instead of statements.
  • Declarative Programming: focuses on describing the desired outcome or result, rather than explicitly specifying the steps to achieve that outcome.
  • Object-Oriented Programming: builds entire programs using classes and objects.
  • Imperative Programming: focuses on describing how a program operates by giving a sequence of statements that change a program’s state.

Key Concepts

  • Abstraction: a concept in programming and computer science that refers to the effort of hiding details and main complexities of a system or process, simplifying or making a thing easier to understand.
  • Scalability: the ability of a system, application, or project to grow and adjust to an increase or change in the amount of work or information it needs to handle.
  • Evolution and Innovation: allows embracing new technologies, programming paradigms, and necessary changes, seamlessly integrating with emerging trends and technological advancements.

Importance of Programming Design

  • Language Design: influences how software is written, understood, and maintained, and is important in the field of computer science and programming.
  • Expressiveness and Readability: a well-designed language provides expressive syntax and semantics, allowing developers to express complex ideas concisely.
  • Productivity: well-designed languages often support portability, allowing code to run on different platforms with minimal modification.
  • Safety and Security: language design influences the ability to write secure and robust code, featuring strong typing, memory safety, and built-in security mechanisms.

Explore the differences between Procedural and Functional programming paradigms. Learn about organizing programs with procedures in procedural programming, and the declarative aspect of functional programming.

Make Your Own Quizzes and Flashcards

Convert your notes into interactive study material.

Get started for free

More Quizzes Like This

Recursive Functions Quiz
6 questions

Recursive Functions Quiz

IllustriousChalcedony1818 avatar
IllustriousChalcedony1818
C Programming Functions Quiz
5 questions
Use Quizgecko on...
Browser
Browser