DEV Community

Discussion on: Change your perspective

Collapse
 
edh_developer profile image
edh_developer

This made me think of metaprogramming in groovy. You could write a library in groovy, with the expectation that users of the library will then update the metaclasses to make method dispatching do whatever they want it to. I'm having trouble thinking of a reason you'd want to do things that way, but it could be done.

I imagine this is true for some other languages that allow for metaprogramming as well. I use groovy as the example because it's the only one where I've actually used metaprogramming personally.