[erlang-questions] Lack of warning for overlapping clauses with
Torben Hoffmann
torben.lehoff@REDACTED
Tue Jul 20 11:30:29 CEST 2010
On Tue, Jul 20, 2010 at 11:03, Kostis Sagonas <kostis@REDACTED> wrote:
> Torben Hoffmann wrote:
>
>> I am afraid that Bernard is right - there is no difference... neither erlc
>> or Dialyzer picks it up.
>>
>> I would like to hear from the OTP team and/or the Dialyzer team to
>> understand what is cooking here.
>>
>
> There is not much to say here, nor anything fishy is cooking. It's just
> that or's/orelse's in guards are not so common in their proper treatment is
> not so easy.
>
That was my fear/expectation - as Joe once said "It is easy to get the
typing right in 98% of the cases and then you'll have to fight hard to get
the last 2%"
>
> Neither erlc not dialyzer ever promised that it will generate all possible
> warnings. In fact, as far as dialyzer is concerned the only thing that was
> promised is that it will not generate a false warning.
>
That is fair enough - I was just surprised that this one got through, but
the handling of or in a guard is going to create some nasty scenarios.
>
> Now, having written that, thanks for your mail because it gives us a
> concrete test case to improve erlc and/or dialyzer.
>
Great - this reinforces my belief in sharing experiences!
Cheers,
Torben
>
> Kostis
>
--
http://www.linkedin.com/in/torbenhoffmann
More information about the erlang-questions
mailing list