3 ms·
every sizeable Java project has a multitude of languages (annotations, XML-based, JSON-based, ...) for configuration, data exchange, etc. Sometimes even 'improv
by lispm 5y ago
every sizeable Java project has a multitude of languages (annotations, XML-based, JSON-based, ...) for configuration, data exchange, etc. Sometimes even 'improved' versions of Java (functional Java, Kotlin, Scala, ...) or use of code generators.
Macros don't necessarily make the program not more difficult to understand from a programming side: an average programmer can write more domain specific code, without the need to understand the technical details. It might make sometimes the maintenance harder, when the implementation of the macro needs to be understood.
Example: the CLOS (Common Lisp Object System) has for the programmer an interface, which is largely based on macros. These make the programming with CLOS easier, than without. The average developer does not care how they are implemented, but they use the macros do describe classes, generic functions and methods. Those could be written in an object-oriented notation, but with much more effort. It's easier to learn the macros, than the object-oriented interface.