The title is a bit misleading as it implies that Elixir doesn't have `fn -> 
"yo" end`, but at least that's cleared up in the body.

I do think it can be useful, IE `Task.async(&foo(args))` is more succinct 
than `Task.async(fn -> foo(args) end)`. Spawning processes and the like are 
about the only cases I can think of where zero arity functions are used 
frequently, but it does seem like it would be a win for consistency and 
readability in certain cases.

Perhaps there are ambiguities introduced however without &1 and friends? 
I'm sure one of the core team members will clarify.

On Wednesday, July 20, 2016 at 8:01:01 PM UTC-4, Scott Parish wrote:
>
> It seems inconsistent that the anonymous function sugar is not allowed for 
> zero arity functions. Is there a good reason for this, or did this need to 
> be proposed as a feature request instead of a bug?
>
> Reference: https://github.com/elixir-lang/elixir/issues/5042
>
> Thanks
>
>

-- 
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/41bfc1d9-fce2-46f1-b72b-5429d0f4fc6b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to