OCaml exceptions run as fast as function calls for the default backend. For Javascript databases, this is not always the case. The canonical way of OCaml is to implement a function that does not throw an exception - use the throwing function and throw the exception in the null variant, for example,
let try_find x xs = try Some (List.find x xs) with Not_found -> None
The call memand findis a performance loss, as you will name the list twice.
. List.find , . , try_find , - (None , ). , . . ( ), , / GADT.
"" Ocaml ?
, OCaml . , . , , Javascript, Java .Net. , . , , , ., result. Janestreet Core ( ), .
( ). . , , , , .