[erlang-questions] On OTP rand module difference between OTP 19 and OTP 20

Raimo Niskanen raimo+erlang-questions@REDACTED
Fri Sep 1 09:58:17 CEST 2017


On Thu, Aug 31, 2017 at 03:42:06PM +0200, Loïc Hoguin wrote:
> On 08/30/2017 12:33 PM, zxq9 wrote:
> > On 2017年08月30日 水曜日 10:29:12 Raimo Niskanen wrote:
> > 
> >> It is in general safer to change the documentation to match the reality.
> > 
> > Wow.
> 
> I certainly hope this is not the general policy for OTP. We program 
> against the documentation. The documentation *is* our reality.
> 
> It also seems it's not even listed in the release notes. We program 
> against the documentation, if the documentation has a breaking changes 
> it would be great to know about it.

I had no idea that statement would be so flammable. :-)

I simply wanted to point out that from the point of view of a developer of
a mature product like Erlang/OTP it is has happened too many times that
a subtle behaviour change breaks something for a customer.

And that is something that programmers writing new code often do not
appreciate since they simply want the libraries to be "right" where it is
a very reasonable view that the documentation defines what is "right".

I also realize that in this particular case to stop returning 0.0 from
rand:uniform() would also have been a safe choice since that would be
almost impossible to detect and almost certainly cause no harm.

And no, I did not state an OTP policy.  We decide from case to case.

> 
> -- 
> Loïc Hoguin
> https://ninenines.eu

-- 

/ Raimo Niskanen, Erlang/OTP, Ericsson AB



More information about the erlang-questions mailing list