You have APT, which allows you to essentially execute code at compile time and generate new translation units (and even modify existing ones if you get creative enough like for example the lombok library, although that requires exploiting some compiler internals).
View all comments
7
u/Biscuitman82 Oct 24 '26
Java has macros?