[erlang-questions] Remove behaviour checking from erl_lint (continued)
Richard A. O'Keefe
Thu Dec 22 02:02:58 CET 2016
On 22/12/16 1:51 PM, Michael Truog wrote:
>> 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
> It doesn't seem like what you have said is as specific as it could be.
It was a perspective, not a program!
> I agree it would be nice to have the compiler to type checking on the
> single module it is processing. However, are you suggesting that the
> Erlang compiler that is fed a single module should know about all other
> modules that will be used along with it, at the same time, and
> effectively run dialyzer on the single module?
I was in fact specific about that:
"to the extent that it *can* be checked locally".
So no, I obviously *wasn't* suggesting that.
To be a bit more specific:
- use the PLT to get information about library modules
- assume that all calls to this module from outside
- assume that all calls from this module to outside
code not described in the PLT are correct
- check only that.
- on request show a list of external functions called
but not checked, mainly to avoid the illusion that
everything was checked.
More generally, there should be a way to compile N modules
together, allowing calls between them to be checked but not
calls outside that group.
I find that the majority of my type errors are internal.
More information about the erlang-questions