4 ms·
It looks like the Partial Application section is missing the most widespread form of partial application, known as "creating an instance". class A: def f
by nine_k 4y 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".
- chongli 4y agoThat'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.
- imbnwa 4y ago>For example, lambdas can be translated to anonymous inner classes. That's how Java 8 more or less implements them, no?