Hacker News new | ask | show | jobs
by jolux 2327 days ago
Java interfaces are not structurally typed, are they?
1 comments

No but it's the closest available. Two classes C1 and C2 that both implement interfaces I1 and I2 can be said to have a common structure. That is, if they both implement I1 and I2 then they have that structure in common.
Yeah but that’s still fully nominal typing, you can’t implement the interface implicitly, it has to be identified by name.