5 Matching Annotations
  1. Apr 2017
    1. 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.
  2. Mar 2017
  3. Feb 2017