News for hackers. Stuff that matters.
Re:Pretending OOP Never Happened by ipnon on Friday May 15, 2020 @08:22PM (#23199118)
Excellent example, thank you.

Edit: To answer your question, the set of all public methods could be seen as 1, but not the only, interpretation of the functional interface.

Re:Pretending OOP Never Happened by uryga on Friday May 15, 2020 @10:02PM (#23199815)
thank you :) i hope i didn't hijack the thread! but i just love sharing stuff like this

> the set of all public methods could be seen as 1, but not the only, interpretation of the functional interface.

could you describe another interpretation? "the set of public methods"¹ is the only thing i can think of when i hear about an object's "functional interface". it could be a terminology issue though – i'm reading "functional interface" in a general sort of way, but i could imagine it having some specific definition in OO theory.

---

¹ or recognized messages, in a more smalltalk-ish context

Re:Pretending OOP Never Happened by ipnon on Saturday May 16, 2020 @12:43PM (#23204979)
The other interpretation has slipped my mind since yesterday, sorry mate. I do think it's an interesting idea that I now see I have no formal understanding of. Cheers.
Re:Pretending OOP Never Happened by uryga on Saturday May 16, 2020 @01:03PM (#23205149)
shame! cheers :)

PS. if you're interested in weird perspectives on this, you might find Coinduction (and "codata") interesting. from wikipedia:

> Informally, rather than defining a function by pattern-matching on each of the inductive constructors, one defines each of the "destructors" or "observers" over the function result.

it's a deep rabbit hole, but i remember it being applied OOP-ish things – "destructors" would roughly correspond to exposed methods.