[erlang-questions] Package Support/Use

Bjorn Gustavsson bjorn@REDACTED
Mon Nov 6 11:58:21 CET 2006


"Ulf Wiger \(TN/EAB\)" <ulf.wiger@REDACTED> writes:

> 
> To continue with the file library, why, for example, does file:read/2
> not crash when fed garbage?
> 
> 3> file:read(bugger, 32).
> {error,einval}
> 4> file:read(bugger, a). 
> {error,einval}
> 

For no good reason, I would say. In newer code, we generally fail
with an exception if a function is given arguments of the wrong type.

I guess that we could change that to R12B, our even for R11B-3 if
our commercial customers don't think that it would break anything.
It would give Dialyzer better type information, allowing it to find
more problems.

/Bjorn

-- 
Björn Gustavsson, Erlang/OTP, Ericsson AB




More information about the erlang-questions mailing list