Variables inside quote have a context. Outside of a module, that context is
Elixir. I believe we have more information in the docs for "quote".

On Sunday, August 14, 2016, Tomaž Žlender <tomaz.zlen...@gmail.com> wrote:

> Why does code
>
> Code.eval_quoted(quote do: name = "Alexander")
>
> evaluates to
>
> {"Alexander", [{{:name, Elixir}, "Alexander"}]}
>
> instead of binding "Alexander" to variable name same as it would if put in
> IEx directly as
>
> name = "Alexander"
>
> --
> 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-talk+unsubscr...@googlegroups.com
> <javascript:_e(%7B%7D,'cvml','elixir-lang-talk%2bunsubscr...@googlegroups.com');>
> .
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/elixir-lang-talk/1796a6e2-31dc-42ce-ad34-
> 773d35498387%40googlegroups.com
> <https://groups.google.com/d/msgid/elixir-lang-talk/1796a6e2-31dc-42ce-ad34-773d35498387%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 


*José Valim*
www.plataformatec.com.br
Skype: jv.ptec
Founder and Director of R&D

-- 
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-talk+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-talk/CAGnRm4%2BPQSOyu%3D5hdym6%3Dcidd0ia6cBV9VjY5vnL6rUjA9p0PQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to