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
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
>
> 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
Has anyone watched Avdi's episode on barewords?
https://www.rubytapas.com/2012/10/01/episode-004-barewords/ (I haven't
checked whether this one is free or requires a subscription.) The concept
seems to apply to what Dave was requesting.
On Mon, Dec 5, 2016 at 11:09 AM Amos King
Is this something that could be solved with an external tool added to your
build chain?
Amos King
Binary Noggin
> On Dec 5, 2016, at 09:29, Allen Madsen wrote:
>
> I would also argue for case 3.
>
>> However, it does not solve the contextual overhead, When changing
I would also argue for case 3.
> However, it does not solve the contextual overhead, When changing or reading
> code, I still need to carefully look at the surrounding context to see if the
> variable is not being used in order to avoid the warning (or I can write the
> code and wait for the
Throwing my 2c in: I'm for emitting the warning all the way. I vastly
prefer reducing the cognitive load to "pretty" code, and personally I
consider the call with parens way prettier than the call without (as it's
clear that it's a function call, and there is no ambiguity). May be not
strictly
I bow to the collective (well, actually, to the people with write
access)... :)
--
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
I used to be on Dave’s side of the argument, but after seeing people get bit by
the ambiguity over and over, including myself, I’m definitely for this change.
Even with a heightened awareness of the issue, I still find I will occasionally
waste cycles on frustrating debugging to find it was a
Sorry for one extra amendment: I also want to add that, if my replies are
not clear, I will gladly expand and give more examples. The point is that
we need more feedback than "you should warn only when there is a function
and a variable".
*José Valim*
www.plataformatec.com.br
Skype: jv.ptec
To further clarify the previous response, we have three options:
1. Do not warn if a variable is used as a function call (Elixir v1.3)
2. Warn if a variable is used as a function call (Elixir v1.4)
3. Warn if there is a variable and a function with the same name (proposed
in this thread)
The
> I think that if you have introduced a var anywhere in your module that
has the same name as a zero arity function then this warning should be
shown that solves all the problems that have been stated.
I have explained in a previous reply why this is harmful and why it does
not solve all the
I think that if you have introduced a var anywhere in your module that has the
same name as a zero arity function then this warning should be shown that
solves all the problems that have been stated.
We compile our code with warnings as errors so it's very important for us to
have warnings
> I just want to throw in my two cents. I don't think a warning should be
> generated if there is no ambiguity about a name.
>
Please re-read my replies and let me know if it is still not clear. The
simple fact this feature exists, it means every time you are changing or
reading code, you have an
14 matches
Mail list logo