[erlang-questions] reserved word guaranteed to be atom if single-quoted?

Kenneth Lundin <>
Sat Feb 20 11:20:04 CET 2010

On Sat, Feb 20, 2010 at 9:50 AM, Michael Turner <> wrote:
> I'd like to submit a patch to the relevant part of the Data Types
> section of the User's Manual, which currently reads as follows:
> ----
> An atom is a literal, a constant with name. 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 @.
> ----
> That seems incomplete to me.  I'd like to add, "or if it's an Erlang
> reserved word", with a link to the list of reserved words.  It doesn't
> make sense to me that this single-quoting of reserved words would ever
> fail in some future version, but I thought I'd ask, just to be sure.
You are correct , if you want an atom with the same name as a reserved
word you have to enclose it
in single quotes. This will always work.

> -michael turner
> ________________________________________________________________
> erlang-questions (at) erlang.org mailing list.
> See http://www.erlang.org/faq.html
> To unsubscribe; mailto:

/Kenneth Erlang/OTP Ericsson

More information about the erlang-questions mailing list