There are three main types of programming languages.
Imperative
programming languages are the most commonly used languages. Examples of this type of language are
C,
C++,
Ada,
Fortran,
Algol,
Java,
Python,
Perl, and so on.
Programming in an imperative
language is generally easier than in functional or
declarative languages since it involves a more
linear process of solving problems. These languages have been evolving more and more toward the
object-oriented paradigm.
Functional programming languages are different from imperative languages in the fact that
everything is written and utilized as
functions.
Lisp,
Scheme,
ML, and
Haskell are examples of
functional programming languages. The
artificial intelligence programming
domain has been heavily influenced by Lisp, and some of its successors. Over time some of the functional programming languages have begun to add certain concepts from imperative languages, but they still remain remarkably different in almost every area.
Declarative programming languages, more often called
logic programming languages, consist of declarations -- statements or propositions -- written in mathematical logic. The only real language of note within this type of languages is
Prolog, which stands for programming logic. Prolog is based on
predicate calculus and an
inference rule called
resolution, which only works on a special kind of proposition called a
Horn clause. The process of resolution is really
proof by contradiction. Declarative programming languages require a totally different mindset to program in than imperative or functional languages. A declarative language allows a programmer to describe the desired results using declarations, and the computer figures out how to achieve those results. An imperative language makes the programmer tell the computer both what they want, as well as the exact way to achieve the goal.
Programming languages as a whole can also be divided into two groups.
Compiled languages, and
interpreted languages. Examples of compiled languages are C++, Ada, and Fortran. Interpreted languages include Lisp, and Perl. Java does not fall completely into either of these categories as the
source code is compiled into Java
bytecode which, when executed, is interpreted by the Java Virtual Machine. Python is also slightly
skewed in the fact that it is interpreted, but can
interface with or be interfaced with compiled languages. Python can also be compiled into Java bytecode. Thus, Java and Python beg the addition of a third group of languages that are both compiled and/or interpreted.