Hacker News new | ask | show | jobs
by phoe-krk 2070 days ago
In the exception example, there is a line saying:

    {'try',{y,0},{f,13}}.
Why is the symbol `try` quoted here? Does it need to, if its name is all lowercase?
1 comments

Because 'try' is also a keyword in Erlang. The other symbols like that without the quotes are atoms (http://erlang.org/doc/reference_manual/data_types.html#atom).

So to have an atom named after a keyword we'd have to add single quotes around it.

Yes, got it - thank you for the response.