Functional Web Dev. with Elixir, OTP, and Phoenix Flashcards
1
Q
Name a disadvantage of using tuples
A
if you plan to use JSON to encode the data, JSON doesn’t have a tuple type
2
Q
Name an advantage of structs over maps
A
structs maintain all map qualities but add compile-time checks on the keys and they allow us to do run-time checks on the struct’s type