2. TIOBE Top 20
2016 2015 2016 2015
Java 1 1 Assembly 11 12
C 2 2 Swift 12 15
C++ 3 3 Ruby 13 10
C# 4 4 Visual Basic 14 13
Python 5 5 Delphi 15 11
JavaScript 6 8 Go 16 65
PHP 7 6 Groovy 17 32
VB .Net 8 7 R 18 20
Perl 9 9 Matlab 19 17
Objective C 10 14 SQL 20 18
TIOBE Web Site
3. Assembly Languages
● Directly correspond to machine languages
● Allow to address memory in a symbolic way (“variables”)
● Examples:
– Microsoft assembler (masm, 1981), GNU assembler (gas),
Netwide assembler (nasm)
5. Procedural Languages
● A program composed of units (modules)
● A unit is called a procedure, function, routine, subroutine,
method
● Examples:
– Fortran (1957), Algol (1958), Cobol (1959), PL/I (1964),
BASIC (1964), Pascal (1970), C (1972), Ada (1977),
Modula-2 (1978), Rapira (1980), C++ (1983), Occam
(1983), Python (1991), Visual Basic 91991), Java (1995),
C# (2000), Go (2009)
6. FORTRAN (Fortran)
● “Formula Translation.” First general-purpose language
PROGRAM AVERAGE
REAL X,Y
WRITE (*,*) "Input x:"
READ (*,*) X
WRITE (*,*) "Input y:"
READ (*,*) Y
WRITE (*,'(a,g12.4)') 'Average = ', (x+y)/2
END PROGRAM AVERAGE
● Data type determined by the first letter of the identifier: “In
Fortran, GOD is REAL (unless declared INTEGER).”
7. C
● The language of Unix system programming
● The “founding father” of most modern languages
#include <stdio.h>
int main(void)
{
int id;
scanf("%d", &id)
printf("hello, %dn", id);
}
● Great flexibility; great power; great responsibility
8. Java
● A “safer” C
● Object-oriented: data and methods grouped into objects; no
global variables
● Uses virtual machine (VM), runs on anything that has a VM
class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello World!");
}
}
9. Modula-2
● A “Niklaus Wirth” language
● Based on Pascal
● Suitable for system programming (but not perfect); supports
multiprogramming
MODULE Hello;
FROM STextIO IMPORT WriteString;
BEGIN
WriteString("Hello World!");
END Hello.
10. Functional Languages
● Programs and subroutines defined as mathematical functions
● Pure* languages do not have variables at all; Python is impure
● Examples:
– Lisp (1958), APL (1964), C (1972), ML (1973), Erlang
(1986), Haskell* (1990), Python (1991), Ruby (1995), C#
(2000), Scala (2004), Java 8 (2014)
11. Lisp
● Favorite language for AI
● Lists are the only major data structure; a program itself is a list
● Modern implementations: Common Lisp, Clojure, Scheme
(defun check (name age)
(if (and (eq name "James") (> age 21))
(list "Welcome, James!" age)
(list "Go home, kid!" nil)))
(prin1 (check "Paul" 24))
● “Lots of Irritating Single Parentheses”
12. Erlang
● Ericsson Language, developed for telecom switches
● Concurrent, distributed, fault-tolerant, soft real-time
● Non-stop applications, code hot swapping, runs on VM
● Has built-in database and Web server
-module(fib).
-export([fib/1]).
fib(1) -> 1;
fib(2) -> 1;
fib(N) -> fib(N - 2) + fib(N - 1).
13. Query Languages
● Designed to insert data into and extract data from databases
and other information retrieval systems
● Declarative: describe a problem rather than define a solution
● Examples:
– SQL/MySQL (1974), XQuery (2007)
SELECT author,title
FROM book
WHERE price > 100.00
ORDER BY author;
14. Command Line Languages
● Means of user interaction with the operating system
● Provide prompt; accept commands with optional parameters
● Allow limited support for procedural programming
● Examples:
– Sh (1977), csh (1978), tcsh (1983), ksh (1983), bash (1989),
zsh (1990)
15. C Shell / TC Shell
● The Unix system written in C; the C shell is the standard Unix
shell
● Provides command history and editing, directory stack, file
name completion, aliases, wildcarding, piping, background
execution
if ( $days > 365 ) then
echo This is over a year.
endif
16. Little Languages
● Serve a specialized problem domain
● Example:
– awk (1977; text processing and data extraction)
$1>0 { s += $1 }
END { print s }
18. Lolcode
● Created in 2007 by Adam Lindsay (Lancaster University).
HAI 1.2
CAN HAS STDIO?
PLZ OPEN FILE "LOLCATS.TXT"?
AWSUM THX
VISIBLE FILE
O NOES
INVISIBLE "ERROR!"
KTHXBYE
19. Brainfuck
● An esoteric language notable for its extreme minimalism. 100
byte compiler!
“Hello world!”:
++++++++++[>+++++++>++++++++++>+++<<<-]>++.>+.
+++++++..+++.>++.<<+++++++++++++++.>.++
+.------.--------.>+.