News for hackers. Stuff that matters.
Re:Fear Not the Association of Types by tadfisher on Sunday August 18, 2024 @04:16PM (#41285100)
Java has a pattern that is a superset of this, which is the self-recursive generic type:

    interface Foo<T extends Foo<T>>

    class Bar implements Foo<Bar>
This is used to implement associated-type and Self-type behavior, at the expense of boilerplate. You can have multiple levels of associated types, though, which is murderous on the pinkies (or whatever finger types the angle bracket keys in your layout).

There are no comments on this comment yet.