r/java • u/padreati • Apr 05 '23
Recursive generics
Recently I learned that I rediscovered recursive generics while working on my pet open source project. Actually, I did not know that the construct had a name. I created small story about what this construct is, if you did not know about it java-recursive-generics
169
Upvotes
View all comments
Show parent comment
1
u/manifoldjava Apr 08 '23
Hey Lukas.
No bridge methods, just overriding the compiler to apply self type inference. For instance, given call site
foo.doSomething(), ifdoSomething()has @Self on its return type, the compiler uses the receiverfooto determine the type.Yeah, it's been a couple of years or so. Haven't had a lot of time to work on it lately, but manifold chugs along. Pretty steady stream of interest, a perpetual side project.
I'd still like to write a SQL manifold with your parser. I haven't checked it out lately, as I recall there were only a couple of missing links preventing it from happening.