Functional! = Function, and for the record, I will argue that the method! = Function ...
Java is a statically typed, object oriented language. Java also maintained relative purity in this way, but not where it is next to a functional language.
Although it is true that you can mimic the behavior of functional programming with imperative programming, you will never get the neat syntax you want for calculating lambda. In a sense, if a language does not support the correct lambda calculus, it is not a functional programming language.
C ++ has functions, but C ++ also has classes. Therefore, C ++ has two types of functions, member functions and functions. When you say a method, you mean a member function. Because the method is called on the instance of the object. But when you say a static method, you mean only a function (in the sense of C / C ++). This is just a dictionary to reference the elements of your code. And in Java, code cannot exist outside the class, the method implies that it belongs to a type of type ie
So far, none of what I said is related to functional programming, but I think you understand that you are mistaken.
I suggest you take a look at pure functional programming languages such as Haskell or Erlang. Because functional programming languages, as a rule, also do not have closers.
Your statement that static methods can be used to simulate functions as first-class objects sounds very strange to me. This is more like a dynamic programming language than functional programming.
John leidegren
source share