What's the difference : | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

What's the difference :

between : + an interpreter ad a compiler ? + functional programming and OOP ?

22nd Mar 2018, 5:35 PM
Hasna Oulaiz
1 Answer
+ 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.
22nd Mar 2018, 6:16 PM
Baraa AB
Baraa AB - avatar