I found them only available in macro context,
what confuses me is why not also put them in normal context.
like in normal programming you can call Person.superclass
and Person.ancestors
I guess it’s because you typically only need thar kind of reflection in a macro context. So nobody bothered to expose them in the runtime API.
It’s easy to if you need it, though. But apparently nobody has needed it so far, which is a good indicator that it might not be very useful.
So nobody bothered to expose them in the runtime API.
. But apparently nobody has meededtit so far, which is a good indicator that it might not be very useful.
I mention this in several place many times. I don’t know why you didn’t see it.
I reference this post again.
The works done by asterite is really useful In my opinion, especially o.all_method
to print all available methods in an object, and .superclass
.ancestors
very helpful for newbie, in fact, I used it often, but because asterite was left, no one continue polish on it.