top | item 27986922

(no title)

paultannenbaum | 4 years ago

Metaprogramming in elixir (i.e. macros) will definitely feel like magic to most. It allows for really powerful abstractions, but doubtful the new guy would have been able to be productive in a month in a large codebase full of them. Your standard phoenix app, yes it is fairly straightforward.

discuss

order

Kototama|4 years ago

But what does a large codebase full of macros would look like? It's an anti-pattern to have too much macros. They should be used as a last-resort option.

nesarkvechnep|4 years ago

I wouldn't say it's an anti-pattern to have too much macros. Macros are a a tool to solve problems. If the problems require macros or at least benefit greatly then macros it is.