Concepts of Programming Languages
Overview
Sebastian Macke
Rosenheim Technical University
Sebastian Macke
Rosenheim Technical University
Programming languages can be categorized in many ways
Wikipedia list of Programming Languages Categorization Lists
2<html> <body> <script> let btn = document.createElement("button"); btn.innerHTML = "Click Me"; document.body.appendChild(btn); </script> </body> </html>
<html> <body> <button>Click Me</button> </body> </html>
List<Integer> integers = Arrays.asList(1, 2, 3, 4, 5);
int sum = 0; for(int i = 0; i < integers.size(); i++) { sum += integers.get(i); }
sum = 0; integers.forEach(n -> {sum += n;}); sum = integers.stream().mapToInt(Integer::intValue).sum();
int sum = math.sum(integers);
Sum the array of integers.
Java | Javascript | Python | C | |
---|---|---|---|---|
Static / Dynamic | S | D | D | S |
Compiled / Interpreted | C | I* | I* | C |
Sequential / Parallel | P** | S** | P | P** |
Static Linked / Dynamic Linked | D | -*** | -*** | S/D |
Safe / Unsafe | S | S | S | U |
Bytecode / Assembler | B | - | - | A |
Platform Dependent / Cross | C | C | C | P |
* But uses just in time compiler ** Depends on standard or version *** interpreted languages are not linked
Java bounds checking of all arrays accesses is expensive.
C++ allows for many abstractions, allows complex computations to be written in a compact form, but is hard to read.
C pointers are powerful and very flexible but are unreliable and error prone.
13
“There are only two kinds of languages: the ones people complain about and the ones nobody uses.”
( Bjarne Stroustrup, The C++ Programming Language)