+ 3

What's the difference between Object Orienrted Programming in Functional Programming?and what advantage does OOP has?

Help. I didn't understand my lecture today. TIA! (・∀・)

19th Jun 2017, 4:11 AM
Shawaine
Shawaine - avatar
1 ответ
+ 12
The basics of OOP I'll leave alone: It's covered rather well in a couple of the courses here on Solo Learn already. Functional programming is a rather different thing (and you do mean Functional, not Procedural, right?). In functional programming, every subsection of your code is returning a value. Often, this value is the major data of interest in the program (which is why Functional programming languages tend to have general structures which lend themselves to modification). Each function call can dig down, change what it needs inside their data, then rebuild the structure needed for the rest of the program. In this way, your data is passed all throughout the program and is open to modification at all stages. Need a value to stay constant? Don't mix up your count of where you are in the list! Sounds a bit antithetical to what languages like Java are up to, doesn't it? I hope this helps.....
22nd Jun 2017, 12:31 AM
Jim
Jim - avatar