00 history Flashcards
(34 cards)
programming paradigm
the way you structure code based on the what you are programming
types of programming paradigms
imperative, structured, procedural, object-oriented, functional, event-drive, declarative, automata-based
imperative paradigm
step by step instructions that the computer follows, most basic form
direct assignments, common data structures, global variables
example of imperative paradigm
fortran, c, java, python
structured paradigm
style of imperative with more readable/reusable code, bans goto and enforces function/block
structograms, indentation
example of structured paradigm
c, java, python
difference between imperative and structured
imperative -> loops, conditionals
structured -> functions, blocks
procedural paradigm
reusable how to -> functions
helper functions and main logic
multiple small functions
example of procedural
python
is procedural a type of structured which is a type of imperative
yes
object oriented paradigm
data -> objects that change through predefined methods only
encapsulation, polymorphism, inheritance
related to procedural
example of object oriented
java -> classes
using getter methods to modify class objects in main
functional
declarative -> what instead of how
filters data, immutable: data flows through the pipeline
related to declarative
example of functional
erlang, elixir
event driven
code executes in response to events
(mouse clicks, timer interrupts)
related to procedural and dataflow
example of event driven
javascript, GUI button, main loop, event handlers, asynch processes (timer)
declarative
defines program logic but not control flow -> specify WHAT not HOW
example of declarative
SQL query
automata based
programs -> model systems as state machines
related to event drive and imperative
example of automata
network protocols
fortran
formula translator
cobol
common business oriented language
LISP
List processing
first functional PL
BASIC
beginners all-purpose symbolic instruction code
interactive shell user interaction -> for non stem students