⚠️ This post links to an external website. ⚠️
My Elixir library pet peeve:
application.ex. It’s common for Elixir libraries to act as their own applications, promoting anti-patterns that lead to less usable code. Many dependencies automate this, creating a supervision tree when running a library, but this complicates configuration. A library shouldn’t impose its supervision tree onto user applications, limiting configurability. The Elixir documentation highlights this issue, particularly in how it discourages using application configuration globally. Better library examples, likeFinch, allow for user-defined supervision trees without dictating their structure. The article emphasizes that while libraries can offer applications’ features, it should be an exception rather than a rule, serving usability and configurability instead of creating rigid structures. This message echoes a call for better library design within the community, urging developers to prioritize flexibility and user control.
continue reading onjola.dev
If this post was enjoyable or useful for you, please share it! If you have comments, questions, or feedback, you can email my personal email. To get new posts, subscribe use the RSS feed.