HN2new | past | comments | ask | show | jobs | submitlogin

> I don't know many other languages that support this feature

The other widely-used one is Go with its structurally-typed interfaces.





Right... But Go is exclusively structurally typed, whereas Java with the manifold compiler plugin complements the type system's nominal foundation -- a class can still implement a structural interface nominally. Doing so enforces intention and helps both people and tooling comprehend code faster and more efficiently. But the general idea is to use an interface structurally where it otherwise can't be used nominally or doing so is more complicated.



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

Search: