# Polymorphism and Structs in Elixir

**URL:** <https://forum.devtalk.com/t/polymorphism-and-structs-in-elixir/212163>\
**Category:** Blogs/Articles/Talks/Podcasts\
**Tags:** elixir, book-advanced-functional-programming-with-elixir, blog-post\
**Created:** [24 August 2025 23:36 UTC](https://forum.devtalk.com/t/polymorphism-and-structs-in-elixir/212163 "2025-08-24T23:36:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![JKWA](https://forum.devtalk.com/user_avatar/forum.devtalk.com/jkwa/32/7693_2.png) [@JKWA](https://forum.devtalk.com/u/JKWA)\
**Post date:** [24 August 2025 23:36 UTC](https://forum.devtalk.com/t/polymorphism-and-structs-in-elixir/212163/1 "2025-08-24T23:36:56Z")

</div>

> **[Polymorphism and Structs in Elixir](https://www.joekoski.com/blog/2025/08/23/elixir-structs.html)**
>
> Polymorphism has always relied on tags. Elixir’s structs make them safer.

Another in my series of trimmings from _[Advanced Functional Programming with Elixir](https://pragprog.com/titles/jkelixir/advanced-functional-programming-with-elixir)_[](https://pragprog.com/titles/jkelixir/advanced-functional-programming-with-elixir). This one explores how polymorphism relies on tags and how Elixir’s structs make that pattern safer and more robust.

---

<div class="post-metadata">

**Author:** ![jkdiaz](https://forum.devtalk.com/letter_avatar_proxy/v4/letter/j/dbc845/32.png) [@jkdiaz](https://forum.devtalk.com/u/jkdiaz)\
**Post date:** [25 August 2025 14:40 UTC](https://forum.devtalk.com/t/polymorphism-and-structs-in-elixir/212163/2 "2025-08-25T14:40:56Z")

</div>

Awesome discussion. I always thought of polymorphism in the OO sense.
