Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Functional != function, and for the record I will claim that a method != function...</p> <p>Java is a statically typed, object oriented language. Java has also maintained a relative purity in that manner but it's no where near a functional language.</p> <p>While it's true that you can mimic the behavior of functional programming with imperative programming you're never gonna get that tidy syntax which you'll wanna have for lambda calculus. In a way, if the language doesn't support proper lambda calculus it's not a functional programming language.</p> <p>C++ has functions, but C++ also have classes. C++ therefore have two type of functions, member functions and functions. When you say method you mean a member function. Because the method is invoked on an instance of an object. But when you say static method you mean just function (in the C/C++ sense). This is just a vocabulary for referring to elements of your code. And in Java code can not exist outside a class, a method would imply that it belongs to some class i.e. type.</p> <p>So far nothing of what I've said relates to functional programming but I think you get the point where you wrong.</p> <p>I suggest you look at pure functional programming languages such as Haskell or Erlang. Because functional programming languages generally don't have closers either. </p> <p>Your claim that static methods can be used to mimic functions as first class objects sounds really bizarre to me. It sounds more like a dynamic programming language than functional programming.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload