There are three kinds of actuaries: those who can count, and those who can't.
Bala Gangadhar wrote:From the definition of Functional programming and Procedural Programming.
Piet Souris wrote:hi Bala,
difficult questions, but I'll give it a shot.
1) (Note: I seem to have thrown out all my Java < 8 platforms, so I could test this snippet only on java 8. Can you check if the override of BalaFunction is legal on java 7?
Piet Souris wrote:
2) Is it possible that such a static method depends on a static mutable variable in the class? Can you elaborate why you think that OOP and FP are contradictory?
Stephan van Hulst wrote:
Bala Gangadhar wrote:From the definition of Functional programming and Procedural Programming.
What are the definitions of functional and procedural programming?
I've never seen this definition given elsewhere, but I think this sums up the differences given here fairly well:
Functional programming focuses on expressions
Procedural programming focuses on statements
Expressions have values. A functional program is an expression who's value is a sequence of instructions for the computer to carry out.
Statements don't have values and instead modify the state of some conceptual machine.
Bala Gangadhar wrote:If a sequence of steps that take some inputs and process them and give an output, without depending on the state of the object is a Function.
Consider Paul's rocket mass heater. |