Ah I thought `with` was part of the language, then I realized how small the 
language core is.
Now I wish the language is actually a little bigger :S mixed feelings.

Thanks for the reply!

On Tuesday, 30 January 2018 23:20:49 UTC+11, José Valim wrote:
>
> Imagine you have this code:
>
>    foo = 1
>    bar = 2
>    foo bar do
>      :ok
>    end
>
> Would you expect it to be equivalent to:
>
>    foo = 1
>    bar = 2
>    foo
>    bar do
>      :ok
>    end
>
> It isn’t because “foo” in its own line is a valid expression. Replace 
> “foo” by “with” and you can see why your proposed syntax doesn’t work.
>
> If you want to write it as you proposed, you need to use parens:
>
>    foo = 1
>    bar = 2
>    foo(
>      bar
>    ) do
>      :ok
>    end
> -- 
>
>
> *José Valimwww.plataformatec.com.br 
> <http://www.plataformatec.com.br/>Founder and Director of R&D*
>

-- 
You received this message because you are subscribed to the Google Groups 
"elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-core/b1566ab8-b47d-4dfa-aafb-568b7dbfb0d4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to