Programming Languages
How I Started
Assembly
- Represents low level processor operations directly
- With minor syntactic sugar
- Non-portable (must be heavily rewritten for every new system)
- Hard to debug
- Can produce very fast or very slow code depending on the expertise of the writer
Compiled
- Code is turned into a binary executable
- This binary is then run
Interpreted
- Code is passed to an interpreter
- The code is run inside the interpreter
Statically typed
- The type of data that variables hold is static
- i.e. it must not change for the life of the variable
- most of the time it implies that the variable type must be explicitly provided
Dynamically typed
- The type of variables could change at any moment
- The type is checked whenever the variable is used
- Flexible but slower (and
int a = 54;
float b = 12.3;
float c = a + b;
a = 54
b = 12.3
c = a + b
c = "Hello World"
d = c + a # Error !
C or C++
Python
Interpreted vs. compiled
- Interpreted languages are often dynamically typed
- Interpreted languages offer faster development as code can be executed and tested in a faster workflow
- But interpreted languages offer this flexibility often at the cost of execution speed
Compiled
- C
- C++
- Objective C
- Java
- SmallTalk
- Processing
- "Arduino"
Interpreted
- Python
- Lua
- Lisp
- Go
- Javascript
- Basic
General purpose
- Provide general functionality for any purpose
- Can often be extended to offer additional specific functionality
Domain specific
- Language provides higher level abstractions for a specific domain
- Domain specific operations become simpler
- General purpose programming generally becomes harder
Domain specific languages
- R, SSPS (Statistics and numerical computation)
- Mathematica, Octave, MATLAB
- Csound
- Dot
- Scratch
- Pure Data/MAX etc.
Behind the scenes code generation
- Gibber https://vimeo.com/80698032
- Processing (a Java extension/code generator)
- Arduino (a code generator for C/C++)
Extensions to general purpose languages
- So many!!!
- Numpy and Scipy for Python (numerical/scientific computation)
- OpenGL libraries
- Basically make code that is often reused, reusable.
Languages
By mantaraya36
Languages
- 1,100