Imperative Paradigm

  • Ordered list of operations
  • Has a return keywords
  • Declare local variables
  • Assign vlaues to variables
  • Variables named with $
  • Loops (for, while)
  • Statements (stuff with no returned value, e.g. if)

Declarative Paradigm

  • Don't tell "how" a program runs. Instead, tell the program "what" to get.
  • Head and rest breaking of lists, e.g.
    • [First|Rest]
    • First:Rest

Functional Paradigm

  • let keyword
  • first class functions, e.g. assign function to a variable
  • invisible return keyword
  • arrows → between types
  • list comprehensions, e.g. [x | x from list, x>3]
  • anonymous functions, e.g. lambda x : x+2
  • higher order functions, e.g. map, filter, fold/reduce
  • everything returns a value, even if
  • pattern matching

Logical Paradigm

  • functions take both args and answers in the ()
  • can calculate function forwards and backwards
  • can give multiple answers from function

Object Oriented Paradigm

  • objects, classes
  • constructors, destructors
  • public, private, protected
  • inheritance
  • namespaces
  • exceptions
  • abstract classes, interface, generics

Scripting Paradigm

  • regular expressions