Henrik N <hen...@nyh.se> wrote:
>Is there precedent for warnings in Elixir about things that could be a mistake but could also be a valid use case?
>
>--
>You received this message because you are subscribed to a topic in the Google Groups "elixir-lang-core" group.
>To unsubscribe from this topic, visit https://groups.google.com/d/topic/elixir-lang-core/tmAESH8Nhz8/unsubscribe.
>To unsubscribe from this group and all its topics, send an email to elixir-lang-co...@googlegroups.com.
>To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/77dc7cd3-07b4-4ef1-8dfa-587587feb0ee%40googlegroups.com.
Hey
How would I silence the warnings emitted when I have deliberate commas in a w sigil?
Cheers,
Louis
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 elixir-lang-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/xmbipso4kehogg28mex2s1j3.1468280949540%40email.android.com.
That is part of the discussion.
I am not probably as familiar with the use cases of sigil as others might be but I get the impression that including commas in a ~w sigil is probably a pretty rare use case. And we are discussing a _warning_ not an error.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/CAM-pwt5jjqbCNoYU%3DZkDuBMWcU7SwpuwpY7rwn_VBcjEMAUOGQ%40mail.gmail.com.
I believe this sort of thing belongs in the realm of linters honestly, c.f. Rubocop. But really good idea. Just my twopence.
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 elixir-lang-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/9A59F3CC-4BA4-4A9D-80B4-9A1B62E6E72E%40nyh.se.
That's a great point. The whole idea of warnings is to call attention to syntactically valid code which is probably not what the developer intended. The canonical example of warnings in C code is
if (x = 1)
{
/* Do something */
}
For those of you unfamiliar with C that code is valid but instead of comparing x to 1 it assigns 1 to x which is always true. As I say it's perfectly legal code and very easily overlooked but probably not what the developer wants to happen. Warnings are meant to call out code that may be unintentionally incorrect.
To Josh's earlier point - - yes this could be caught by a linter. I don't have a strong feeling either way and now that I have made that mistake once I probably won't make it again. I was thinking of others who might make this mistake in the future.
--
You received this message because you are subscribed to a topic in the Google Groups "elixir-lang-core" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/elixir-lang-core/tmAESH8Nhz8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to elixir-lang-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/2ef950d9-47c6-4e51-bab4-4a907f5dde12%40googlegroups.com.