Atoms

49 views
Skip to first unread message

zak9...@gmail.com

unread,
Feb 25, 2015, 11:13:07 AM2/25/15
to elixir-l...@googlegroups.com
Elixir documentation as well as "Introducing Elixir" refer to atoms as bits of text that start with a colon, like :hello
However, no where in the documentation is mentioned that any bits of text that start with capital letters are atoms too like Hello
iex(1)> is_atom(Hello)
true



Waldemar Rachwał

unread,
Feb 25, 2015, 1:52:26 PM2/25/15
to elixir-l...@googlegroups.com

--
You received this message because you are subscribed to the Google Groups "elixir-lang-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-ta...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-talk/858d19ab-f6b6-4f23-b97a-0e58241fa657%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Michał Muskała

unread,
Feb 25, 2015, 2:28:53 PM2/25/15
to elixir-l...@googlegroups.com
Actually every module is an atom in both erlang and elixir. SomeModule is just a syntactic sugar for :'Elixir.SomeModule'

iex(1)> :'Elixir.SomeModule' == SomeModule
true
Reply all
Reply to author
Forward
0 new messages