by eric4smith · 5y ago · 0 comments
We have a new guy who started a bit less than a month ago.
He’s now already writing functional Elixir (no pun intended) and contributing to big code base.
One of the first things I told him is that “there is no magic in elixir”. What you see is what you get.
If you understand that everything is literally a function - life is easy and using the language becomes fun.
Except when it's a macro :-D
But yes, the only headaches I’ve had have been with hard-to-follow macros.
That said, the Phoenix Framework has some well-chosen macros that are a delight to work with. Furthermore, all these macros are defined in your source when you create a new Phoenix project—I feel that over all there is remarkably little magic in Phoenix, and what magic there is is easily inspectable.
But try to peek under the hood of Phoenix.Helpers someday... And also, don't ask too many questions about how Ecto drivers work... I tried writing an ecto driver once and gave up. Props to the people who made the Sqlite3 driver.
No bot.
What's the point of a bot?
I type that way because I have some kind of mental condition that makes me try to make things easy to read for everyone.
It's not magic, it's a regular feature of functional programming languages.