High Level Vs Low Level
High Level Languages
High-level languages aim for readability and simplicity for humans, although this can sometimes come at the cost of raw performance.
Example: Python
Typical Python code might look like:
a = 97
a += 1
print(chr(a))
Key points:
- Readability: simpler syntax close to human language, making it easier to learn and use. This is an advantage often highlighted by programming bootcamps.
- Portability: adapted to different architectures without requiring many modifications.
- Abstraction: They hide hardware details, allowing developers to focus on logic. However, this abstraction can sometimes hide the underlying entanglements, which can make it difficult to fully understand what is really happening inside the machine.
Low Level Languages
Low-level languages directly approximate how hardware works. They can provide rapid and efficient execution, but have the cost of generally being more difficult to handle.
Example: Assembly language
An assembly language program might look like:
MOV AL, 61h ; Charge 97 dans AL
INC AL ; Incrémente AL à 98
MOV AH, 0Eh ; Fonction BIOS pour afficher le caractère en AL
INT 10h ; Interruption BIOS
Key points:
- Hardware proximity: they interact directly with memory and hardware.
- Performance: potentially faster and more efficient thanks to machine-specific optimization.
- Compatibility limitation: designed for a specific architecture, which may limit their portability. For example, an .exe file will not work natively on macOS.
In Conclusion
High-level languages, which are close to human language, simplify programming but can introduce additional costs in terms of performance.
Low-level languages provide optimal performance + direct control over hardware. However, the learning curve is steeper.
Each type has its advantages and disadvantages. This will often depend on the context and needs of the project.