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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly