Hacker News new | ask | show | jobs
by nine_k 1453 days ago
It looks like the Partial Application section is missing the most widespread form of partial application, known as "creating an instance".

  class A:
    def foo(self, x):
      # do something

  a = A()
  foo(1)  # self is already "applied".
1 comments

That's a very good point. People think of functional programming languages and OOP languages as entirely separate worlds that, like oil and water, do not mix. In reality they're equivalent, they just have different ergonomics.

For example, lambdas can be translated to anonymous inner classes.

>For example, lambdas can be translated to anonymous inner classes.

That's how Java 8 more or less implements them, no?