+ 2
What's the difference :
between : + an interpreter ad a compiler ? + functional programming and OOP ?
1 ответ
+ 9
FIRST ONE:
A compiler is a program which coverts the source code of a programming language into executable machine code for a CPU.
An interpreter takes each line of source code of a programming language, and executes it there and then. It goes on to do the same for the next line afterwards.
SECOND ONE:
Object-oriented languages are good when you have a fixed set of operations on things, and as your code evolves, you primarily add new things. This can be accomplished by adding new classes which implement existing methods, and the existing classes are left alone.
Functional languages are good when you have a fixed set of things, and as your code evolves, you primarily add new operations on existing things. This can be accomplished by adding new functions which compute with existing data types, and the existing functions are left alone.