Programming Languages#
Hierarchy of Programming languages#
Source: Compilers vs. Interpreters
Compilation vs. Interpretation#
Source: Own figure
Compilation vs. Interpretation#
Here are some differences between Python (interpreted language )and C (compiled language):
Python |
C |
---|---|
- Compilation at runtime |
- Compilation before runtime |
- Closer to natural language |
- Closer to machine language |
- Dynamic typing |
- Static typing |
- Many built-in functions |
- No built-in functions |
- Garbage collection |
- Manual memory management |
So should scientists use Python or C? - Summary#
There is always a trade-off between programming time and execution time.
Python is a very readable programming language and therefore very popular among scientists.
To make it more efficient, many operations are optimised in the background.
Still you need to know how to use the packages properly.