Re:Programming Paradigms for Dummies: What Every Programmer ...
by pjmlp on Monday November 05, 2018 @05:42PM
(#18386682)
Java emulates macros via annotations and compiler plugins.
Re:Programming Paradigms for Dummies: What Every Programmer ...
by jdmichal on Monday November 05, 2018 @06:03PM
(#18386808)
Annotation-based methods are crippled by the limitations of annotation placement. For instance, you can't "annotate" an expression, which is where you will tend to see boilerplate of the type needed for partial application. (Because partial application is easiest emulated as a lambda which routes to the target function while providing fixed values to parameters.)
And this is extremely relevant to the point. If the primary complaint against function programming in Java is "comfort" and "boilerplate"... Macros address both those problems very well. If Java had macros, it would be very simple to isolate and minimize that boilerplate.