For what it's worth, I'm looking at something similar for the iOS codegen rewrite to represent fragments as protocols, although there's some crazy nonsense you can do with Swift protocols that I don't know will translate very well to Kotlin (or especially Java). Let me know if y'all wanna discuss at some point.