Hacker News new | past | comments | ask | show | jobs | submit login

Making the conversion from/to Map and (keyword) list explicit makes sense, as they have very different access patterns: keyword lists really are not suited for random access unless very small.

And in general Erlang and Elixir have very little automatic type conversions, if any.

But maps and structs are interchangeable, I don't get why using one or the other would make your GenServer code any different. A struct is just a map with an additional field called "__struct__".




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: