Sunday 21 January 2018

Types of programming languages

Interpreted vs Compiled

  • In an interpreted language each step of the source code is executed as is.
  • A compiled language uses a compiler to convert the human-readable source code into a binary form as an initial task.

Dynamic vs Static

  • In a dynamic language a variable can contain different types at different times.
  • In a static language the type information is all about the variable itself, not the value in the variable.

Imperative vs Functional

  • An imperative language models the running state of a program as mutable data and issues a list of instructions that transform that running state.
  • A functional language operates on values but, instead of altering the inputs, functions act like mathematical functions and return new values.
(Source: The Well-Grounded Java Developer, by Benjamin J. Evans and Martijn Verburg)

1 comment:

adil said...

JVM Languages (Java vs Groovy vs Scala vs Clojure):

Java is a runtime-compiled, statically typed, imperative language which emphasises safety, code clarity and performance at the cost of verbosity.

Groovy is an imperative, dynamic, compiled language with syntax very similar to Java’s, but more flexible.

Scala is an imperative, statically typed, compiled language that supports aspects of functional programming and some type inference (which gives it the feel of a dynamic language).

Clojure is a dynamically typed, functional language. It’s a compiled language, but usually distributes code in source form.