Search code examples
erlangrecords

Erlang record syntax with single quotes


Can someone explain the single quotes (' ') in this Erlang record syntax?

#'queue.declare'{queue = <<"hello">>}

Solution

  • In this expression, 'queue.declare' is the record's name, and therefore must be an atom.

    An atom should be enclosed in single quotes (') if it does not begin with a lower-case letter or if it contains other characters than alphanumeric characters, underscore (_), or @.