| | Archives of the Caml mailing list > Message from Pierre Weis (Site not responding. Last check: 2007-11-06) |
 | | I also agree with you that initializing a vector with a dummy value is not a good practice and not an acceptable solution. |
 | | However, the Java's way of testing further accesses to elements of vectors does not seem to be more appealing, since it does not ensure proper initialization of vectors, and thus spurious exceptions, due to access into improperly initialized vectors, can occur at anytime after the creation of the faulty vector. |
 | | For instance: [random_initialize f i0 n] returns a vector [v] of length [n], initialized using the function [f], starting from index [i0]. |
| caml.inria.fr /pub/ml-archives/caml-list/2000/05/a6ddaffd930b4479540eb2d758cf4ff2.fr.html (346 words) |