On Tue, Jul 26, 2011 at 12:11 PM, Patrick Walton <[email protected]> wrote:
> On 7/26/11 12:05 PM, Tim Chevalier wrote:
>>
>> IMHO, a non-exhaustive alt is always an error. If some cases are
>> "impossible", a static requirement for the programmer to declare their
>> intentions explicitly by inserting a fail (hopefully with an
>> informative error message) can save a lot of time later.
>
> I prefer warnings, in the interests of quick-and-dirty hacks.

Or a compiler flag that toggles the behavior? In all of my ocaml
projects, I always have the "treat non-exhaustive pattern checks as
errors" and I'd want to do the same for rust, but I can understand not
requiring it for quick-and-dirty hacks.
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to