Hacker News new | ask | show | jobs
by Quekid5 528 days ago
Oh, I see...

I think I was thinking about reflection in an entirely different way. When I think Reflection I think mostly static and generative reflection -- so you can introspect on data structures, derive [whatever] from that, generate code, whatever... but you still cannot do [whatever] to the thing you reflected on. (Other than whatever the language says you can do as a public consumer of that API/structure)

So you can, say, add serialization code, generate property test instances, whatever.

What you cannot do is do anything to "invade" the thing being reflected on and change its meaning.

1 comments

This sort of thing seems you should be able to do already at compile time instead of using reflection?