5 Matching Annotations
- Apr 2017
-
matthewlehner.net matthewlehner.net
-
engineering.appcues.com engineering.appcues.com
-
The choice between maps, structs, and keyword lists, or between string keys and atom keys, is not always clear, and improper decisions can lead to headaches. This article promotes simple guidelines to keep the Elixir programmer out of trouble: Use string-keyed maps for data which has just arrived from an external source. Convert external data to structs as soon as possible. Use ExConstructor or something similar to abstract away the handling of string-keyed maps. Use structs almost everywhere else in your program. Use other atom-keyed maps sparingly. Use keyword lists only to provide arguments to a function. These rules of thumb have improved the quality of our code here at Appcues, and we hope they can help you out too.
-
- Mar 2017
-
shane.logsdon.io shane.logsdon.io
- Feb 2017
-
blog.overstuffedgorilla.com blog.overstuffedgorilla.com