Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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".


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?




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: