To DSL or Not to DSL?
Learn when to use DSL instead of standard functions.
So DSLs are pretty cool, huh? It’s tempting to solve all kinds of problems this way, but be careful! Many problems that seem like a good fit for a DSL are often better served by standard functions.
The big three
Whenever trying to decide whether a DSL is a good fit, keep the following questions in mind:
- Can the domain be expressed naturally by macros in Elixir’s syntax, such as HTML tags?
- Would a DSL cause the caller to think more or less about how to solve their problem?
- Should I require users of my library t
...
Emailer
library as a DSL
With that thought, let’s ...
Access this course and 1400+ top-rated courses and projects.