Marker Interface Nested Enum Polymorphism

Render one heterogeneous list with one composable by tagging unrelated classes with an empty interface, plus a nested enum each implementor answers where the renderer has to branch. Covers when a tag beats a sealed hierarchy, the exhaustiveness you give up in exchange, and the ways an item silently stops rendering. Use when the items come from modules that cannot be sealed into one file, when a newly added item type appears as a blank row nobody noticed, or when two tags want the same accessor name and one class needs both.

maxrave-dev e075cb1 6.7 KB Updated

File contents

maxrave-dev/kotlin-footguns/tree/main/skills/marker-interface-nested-enum-polymorphism commit e075cb15c4

Frequently asked questions

npx skillmds@latest add maxrave-dev/marker-interface-nested-enum-polymorphism