News for hackers. Stuff that matters.
Re:Elixir Is Erlang, not Ruby by bcrosby95 on Monday September 07, 2020 @10:13AM (#24399526)
I'll take Elixir's macros and metaprogramming over Java's solution: annotations. With macros you can easily find and examine what it's doing.

But annotations are just tags that do nothing, and god knows where the code that actually does anything as a result of them resides.

Re:Elixir Is Erlang, not Ruby by hosh on Monday September 07, 2020 @10:57AM (#24399833)
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.
Re:Elixir Is Erlang, not Ruby by nobleach on Monday September 07, 2020 @11:03AM (#24399884)
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.