As I mentioned in IRC, I think this is a slippery slope. We never mention
True/False in the docs and Erlang does not have them; if the warning would
be specifically for Haskell and Python programmers, than we should ask
ourselves, should we try to warn on everything in Elixir that looks like
something in another language? For example, when I go back and forth
between Elixir and Ruby, I put the do in def in Ruby, and I imagine many
people coming from Ruby will forget the do in def when using Elixir: should
we warn on such cases? This may not be the best example given that the
warning on True/False is quite straightforward and non-intrusive to
implement while warning on missing do would require changes to the parser
and so on, but I hope it conveys the idea.



Andrea Leopardi
[email protected]

On Sat, Aug 13, 2016 at 8:58 PM, José Valim <[email protected]
> wrote:

> I am at first positive on this change. There is at least two mainstream
> languages that use True and False: Haskell and Python. Although I am not
> sure the warning will be really helpful at large, I don't think we would
> lose anything as it is quite unlikely someone has a module named True (or
> False). So it seems like a net benefit.
>
> What are other people thoughts?
>
>
> On Saturday, August 13, 2016, miwee <[email protected]> wrote:
>
>> I recently got bitten by this. I used True/False, thinking them as
>> boolean values true/false. Got no warning, but code failed. Partly reason
>> is that I was recently alternating between python and Elixir code base.
>> Python uses True/False. May be a gentle reminder from elixir compiler, on
>> usage of True/False could have saved me from this.
>>
>> thanks
>> miwee
>>
>> --
>> 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/ms
>> gid/elixir-lang-core/df1d6c68-6303-41f3-83d8-1dc4b1ed2121%40
>> googlegroups.com
>> <https://groups.google.com/d/msgid/elixir-lang-core/df1d6c68-6303-41f3-83d8-1dc4b1ed2121%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> 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/CAGnRm4LuUbQczRk%3DYc0Mx18oci1cZzSdqPKWfTKG8%
> 3D_WqF7dsw%40mail.gmail.com
> <https://groups.google.com/d/msgid/elixir-lang-core/CAGnRm4LuUbQczRk%3DYc0Mx18oci1cZzSdqPKWfTKG8%3D_WqF7dsw%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAM9Rf%2BLG4zqPDChND9YKSvOZUVpkfmhm-vVbZ-w6xouYnqDOUg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to