Hacker News new | ask | show | jobs
by devinus 4765 days ago
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.

3 comments

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.
Personally I would rather leave the syntax disambiguation to the programmer when relevant, rather than enforcing a single, awkward-looking syntax for all cases.
Its true, but Joe is also correct that this is going to be something people complain about for decades.