On 03/13/2012 07:27 PM, David Allsopp wrote:
+1. Surely in projects where repeatability is important, the change in 
behaviour to randomly seeded tables would be quickly noticed

The problem is that the randomization might go unnoticed if the high-level outputs of the program does not depend on the ordering when enumerating the hash table (because the "interesting" algorithms built above the hash table is supposed to be invariant w.r.t. the ordering of their input). So the programmer doesn't turn randomization off, but one day, the end-user discovers a bug (caused by a very subtle bug in the algorithm, which in fact, depends on the ordering), and one cannot reproduce it.

Ocsigen and other web libraries can decide to turn randomization on by default to protect their users, but for a general purpose programming system like OCaml's stdlib, increasing reproducibility seems more important than protecting programmers from high-level defects (possibility of DoS) caused by a poor choice or use of low-level data structure.


Alain

--
Caml-list mailing list.  Subscription management and archives:
https://sympa-roc.inria.fr/wws/info/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

Reply via email to