> the OCaml compiler complains with a warning if you use a refutable pattern in `let`.
And what does OCaml do at runtime if the pattern is refuted? On Mon, Dec 23, 2013 at 12:23 PM, Patrick Walton <pcwal...@mozilla.com>wrote: > On 12/23/13 4:12 AM, Gábor Lehel wrote: > >> I don't like either that (a) the possible failure is silent, and >> refutable lets look the same as irrefutable ones, nor (b) baking fail!() >> into the semantics. Haskell has these also and I think it's a wart. The >> proposed syntax solves both issues. >> > > For what it's worth, Rust's pattern matching is pretty heavily based on > OCaml's and the OCaml compiler complains with a warning if you use a > refutable pattern in `let`. > > Patrick > > > _______________________________________________ > Rust-dev mailing list > Rust-dev@mozilla.org > https://mail.mozilla.org/listinfo/rust-dev >
_______________________________________________ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozilla.org/listinfo/rust-dev