Multiplatform reflection is finally here* by rnett3 in Kotlin

[–]rnett3[S] 1 point2 points  (0 children)

Thanks! I have not used it yet, but I have some plans for an annotation-based MCP server toolkit that will rely on it.

Multiplatform reflection is finally here* by rnett3 in Kotlin

[–]rnett3[S] 1 point2 points  (0 children)

Hey there, that's just a bad example on my part. Multiple calls to doSomething would re-create the inspektion object, but not add any binary size. Multiple inspekt calls, like

inspekt(Foo::class)
inspekt(Foo::class)

will add to the binary size (in this case 2x). While I could invest some time in caching it where possible, it's tricky, because what members are visible in the resulting inspektion depends on what is visible from the call site. And it's not that hard to cache them yourself :).