News for hackers. Stuff that matters.
Re:A Week with Elixir by rubyrescue on Friday May 31, 2013 @11:45AM (#5799258)
Joe's points are really good. This drives me crazy in Elixir:

iex(1)> f = fn x -> x + 1 end

#Function<erl_eval.6.82930912>

iex(2)> f()

(UndefinedFunctionError) undefined function(stack trace trimmed...)

iex(2)> f.(1)

2

Re:A Week with Elixir by devinus on Friday May 31, 2013 @12:09PM (#5799431)
https://groups.google.com/forum/?fromgroups#!topic/elixir-la...

This was José Valim's rationale on the mailing list. Once you understand what's involved, f.() begins to look like a pretty good compromise.

Re:A Week with Elixir by jallmann on Friday May 31, 2013 @01:24PM (#5799904)
That kind of variable shadowing is a smell. The compiler should warn about it, and/or re-bind the local method as expected (possibly shooting programmer in the foot, but hey... that's why it's a smell, Don't Do It). Forcing an inconsistent syntax to handle one corner case seems like another smell in itself.
Re:A Week with Elixir by lobster_johnson on Friday May 31, 2013 @12:57PM (#5799738)
Personally I would rather leave the syntax disambiguation to the programmer when relevant, rather than enforcing a single, awkward-looking syntax for all cases.
Re:A Week with Elixir by jeremyjh on Friday May 31, 2013 @12:54PM (#5799718)
Its true, but Joe is also correct that this is going to be something people complain about for decades.