[erlang-questions] [ANN] Erlson - dynamic name-value dictionary data type and syntax

Anton Lavrik alavrik@REDACTED
Mon Aug 29 07:35:10 CEST 2011


On Mon, Aug 29, 2011 at 12:05 AM, Rapsey <rapsey@REDACTED> wrote:
> Looks great. Glancing at the code, erlson:from_proplist if your proplist key
> is not an atom will not work, or will it? It would be nice if it
> automatically converted from lists and binaries.

Yes, erlson:from_proplist() accepts only atoms as keys. Otherwise, it
would be inconsistent with property lists as defined by the
"proplists" module. Here's a quote from the documentation:

"Property lists are ordinary lists containing entries in the form of
either tuples, whose first elements are keys used for lookup and
insertion, or atoms, which work as shorthand for tuples {Atom, true}
."

Anton



More information about the erlang-questions mailing list