Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Mark my prediction: as the big "non-core++" libraries get bigger and trashier with their macros, and more used by the community, hex.pm will become littered with even more trashy macro libraries, and people will stop saying "don't use macros".


Eh, there is also plenty of indication this may not happen. :)

- Many of the non-core++ libraries are considered done

- Many popular and upcoming projects have zero macros: Decimal, Jason, Telemetry, Mint, Finch, Req, etc

- All machine learning projects have either zero macros (Axon, EXLA, Bumblebee) or the macro layer is built on top of the functional API (Nx and Explorer)

- Phoenix LiveView, which is the most recent project from the Phoenix team, is very minimal on the use of macros

- Most of the Phoenix sub-projects have zero-macros: phoenix_pubsub, phoenix_html, phoenix_ecto, esbuild/tailwind, etc

I mentioned this in another comment but in my opinion Phoenix is low on the use macros. They are present in the endpoint+router but then you are working with functions. I speculate the reason why they stand out is because they are the entry-point of your code. But even then the socket API in the endpoint is being replaced by a functional API thanks to contributions from Mat Trudel and the new verified routes are way less magic than the previous route helpers.


> Decimal, Jason, Telemetry, Mint, Finch, Req

These are all truly fantastic Non-core++ libraries. Also some really good ones on the horizon like Bandit.

But I'm love elixir and I'm not calling out the good ones. I'm calling out the less good ones. Because I see a lot of young libraries that pick up on those patterns, and so I can only believe it's spreading (can't be bothered to actually quantitfy, sorry). I don't think I'm bringing a curmudgeon. Legibility and debuggability are real concerns.


I’m pretty sure that the libraries you consider core++ such as ExUnit and Ecto are considered feature complete and won’t get any bigger.


Correct, but remember core++ seeded atrocities like ExUnit.CaseTemplate.

Anyways my prediction is about Non-core++ libs, which I listed in gp.


I was never fully pleased with ExUnit.CaseTemplate. If you have suggestions I am all ears. :)


just yeet it and have people do it manually. To be honest, it's not fatal for the ecosystem. It will just be slightly less enjoyable over time.


I'm sleep deprived. Would not it rather be "start" saying "don't use macros", given that macros are "bad"?




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: