Key differences between Church and Java

Church supports polymorphism through generic functions which are implemented via a simplified variant of Haskell's type-class mechanism. This approach is completely different from that used in object-oriented programming languages, including Java. In Java: encapsulation, class pointers, interfaces / abstract classes and inheritance provide the infrastructure necessary to support polymorphism, by allowing different methods to be directly attached to the data structures on which they are intended to operate. Church does not group generic functions into classes and attach them to data structures, but instead specializes the references to them in an evaluation phase that happens before the run-time execution of the program. Church's mechanism, the central idea for which is due to the Haskell community, is managed by the Church compiler and is (almost) completely invisible at the Church source code level.