Macros for Program Generation

The library should be this: OOP.

OOP in the BEAM VM (and thus also Elixir) is mostly made possible by tuple calls. Relevant and good discussion: Tuple Calls.

However, Erlang OTP 21.0 is released and, well:

“Tuple calls” have been removed from the run-time system.

Not sure if the OOP library is making use of those; there should be other ways but IMO the OTP 21 release signals that the Erlang maintainers are not focused on supporting such mechanisms of the BEAM and thus, indirectly, are not interested in emulating OOP. I am not informed about the exact reason though (most likely a technical and not a conceptual one I’d guess), just giving you some pointers if you want to research further.

1 Like