This document was written by CS 290W TA Joshua Kay and was last modified
Types of programming languages
Linear (or Monolithic)
------
Things are always done one at a time, so multi-tasking cannot exist.
Entire program is one file, generally with gotos galore. This makes larger programs become MUCH more complex.
This is what programmers call 'spaghetti code' - because it randomly transfers control all over the place without much direction.
BASIC is the classic example
Procedural
------
Breaks programs into different sub-programs and functions, and it's also known as Structured Programming
Modularizes programming somewhat. Lots of small files that are relatively self-contained.
Allows Parameter passing, scope of variables
Pascal and C are the classic examples
Object oriented programming (OOP)
------
OOP treats everything as if it were a physical object.
A good example is if you wrote a Yahtzee program. You would have five die objects, to emulate the dice you roll. Each die has certain characteristics (that is, what side is up, or what the value is), and also certain methods, such as color, rolling, etc.
Note that OOP will never 'completely' emulate life - there are too many things that can happen, infinite possibilities
example: you're not going to write a threwDiceTooFarLandedInOceanITriedToGetThemAndGotSwallowedByAShark method for your dice class. unless you're doing game programming, and then I guess it's possible... :)
This OOP style modularizes programming much more, allows for better-written, smaller pieces. This works very well with Graphical User Interface (GUI) applications.
Technically, C++ is object oriented, but programmers often write Linear, Procedural, and Structural programs in it.
It is difficult to write non-OOP in JAVA