To be fair, Elixir also allows developers to tag functions, which can then trigger macros. Some of them (like @doc) does not transform code, but others (like @impl, or Appsignal’s transaction decorators) will.
I'm not disagreeing with that sentiment, but I learned a considerable amount while implementing my own annotations. I do agree that they can be maddening... especially in the case of Spring Boot where you can forget to add a @Component annotation, and unit tests will pass... then you'll deploy your app and immediately see it blow up in prod.
Re:Elixir Is Erlang, not Ruby
by princevegeta89 on Tuesday September 08, 2020 @01:54AM
(#24405553)
Yup the annotationPorn on Java is so unfortunate.
I'll take any alternative to it any day.
But annotations are just tags that do nothing, and god knows where the code that actually does anything as a result of them resides.