4 ms·
Or not require {} everywhere even for single statements, a la F#: try foo() with | ex1 -> failWith "doh!" and allowing these to be expressions rather than
by thelazydogsback 7y ago
Or not require {} everywhere even for single statements, a la F#:
try foo() with | ex1 -> failWith "doh!"
and allowing these to be expressions rather than just statements. Exceptions become much easier to deal with this way:
let result = try compute() with ex1 -> failwith "doh!" | ex2 -> -1