Personally, I've been gravitating toward the explicitness of `fun_call()` over `fun_call`, but have been on the fence about the warning. Something occurred to me while reading this conversation, though: I think this change means that *any* attempted shadowing in Elixir will yield a warning or error, which seems like a very good thing, because it means a name always refers unambiguously to one thing, and what that thing is can be known just be looking at the code.
For those of you who are opposed to this warning: are you concerned primarily about the affect it'll have on new code that you write or about the need to update existing code to not trigger the warning? If it's more about the need to update existing code (as Steve Pallen mentioned), I think a tool to help upgrade to 1.4 would go along way towards addressing that concern. I'm thinking of a static analysis tool that would update `foo` to `foo()` in any place that trigger the warning. You could run it on a code base and deal with the warnings in about 30 seconds. I imagine the core team doesn't have the time to make such a tool a priority, but if someone from the community wanted to step up and build a migration tool that made it easy to update code to avoid new Elixir warnings for things that can be addressed by an automated tool, it would be really, really useful. We had something similar for RSpec 3 when that was released called transpec <http://yujinakayama.me/transpec/> and it made a huge difference in helping people upgrade. José, you mentioned that this warning was originally slated for 1.3 and then was pushed back to 1.4, which makes me wonder: do you have a roadmap for future warnings you plan to add to Elixir? If there are things you plan to warn on in the future, it would be nice if they were documented so we can begin avoiding them now. Myron On Monday, December 5, 2016 at 11:10:00 AM UTC-8, OvermindDL1 wrote: I am very for not only this warnings but making it entirely in to an error. Perhaps only defmacro's should be allowed to be called without parenthesis and all functions defined with `def` otherwise must have parenthesis. > > Although I'd also be for going the other way, removing parenthesis (and > commas separating arguments) except for blocks, but that is more functional > than what Elixir is going for. ^.^ > > > On Monday, December 5, 2016 at 11:37:46 AM UTC-7, José Valim wrote: >> >> The reason this feels unconvincing to me is because the situations >>> where this comes up would be very infrequent for me. >> >> >> That's a very good point I forgot to take into account in my initial >> reply. Thank you! >> >> -- 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/1b839577-3121-410c-aaab-33d86fb6dd0b%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
