# When to use Struct?

**URL:** <https://forum.elixirforum.com/t/when-to-use-struct/2396>\
**Category:** Questions\
**Tags:** data-structures, book-programming-elixir, structs\
**Created:** [November 15, 2016, 1:46pm UTC](https://forum.elixirforum.com/t/when-to-use-struct/2396 "2016-11-15T13:46:20Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![AstonJ](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/astonj/32/15_2.png) [@AstonJ](https://forum.elixirforum.com/u/AstonJ)\
**Post date:** [November 15, 2016, 3:17pm UTC](https://forum.elixirforum.com/t/when-to-use-struct/2396/3 "2016-11-15T15:17:28Z")

</div>

I am just going through the [Elixir and Phoenix Bootcamp](https://forum.elixirforum.com/t/the-complete-elixir-and-phoenix-bootcamp-udemy-course/2271) course and in my notes I have written:

> **Structs**

Just like Maps but with 2 advantages:

> 

- Can be assigned default values
- Additional compile-time checking of properties

> If we know the properties we are going to be working with we will use a Struct instead of a Map.

---

_[View the full topic](https://forum.elixirforum.com/t/when-to-use-struct/2396)._
