[erlang-questions] Remove behaviour checking from erl_lint (continued)

Richard A. O'Keefe ok@REDACTED
Thu Dec 22 01:13:53 CET 2016


Let me offer another perspective.

Once you add -type and -spec declarations to your Erlang code,
it becomes ASTONISHING that your code is not in fact type checked
by the compiler.

There is no other programming language that I use or have ever
used in which source code *with* type information isn't checked
by the normal compiler, to the extent that it *can* be checked
locally.

It is fatally easy to think that because you took care
to write -type and -spec and the compiler is silent that
your code is type correct, when it isn't.

Long term, we should not be shunting off ever more checking
from the compiler to the dialyzer; on the contrary, the
dialyzer as a separate tool should disappear.  There should
still be some compiler option to say how *much* checking is
to be done, but the default should be "I'll check everything
I can within the limits of what you've given me".




More information about the erlang-questions mailing list