I find the ability to have refutable let more compelling than the ability to work around it with functions wrapping `match`
On Sun, Dec 22, 2013 at 11:00 PM, Carter Schonwald <[email protected]> wrote: > Agreed! > > > On Sunday, December 22, 2013, Ziad Hatahet wrote: >> >> But we already have Option::unwrap_or() and Option::unwrap_or_else() that >> behave similar to the 'else' syntax suggested above. >> >> -- >> Ziad >> >> >> On Sun, Dec 22, 2013 at 10:37 AM, Léo Testard <[email protected]> >> wrote: >>> >>> Hello, >>> >>> Le 22 déc. 2013 à 18:59, Stefan Plantikow <[email protected]> a >>> écrit : >>> >>> > Hi, >>> > >>> > Am 22.12.2013 um 16:47 schrieb Gábor Lehel <[email protected]>: >>> > >>> > This is a nice idea. At first I thought it wouldn’t work with `if` but >>> > in expressions `if` requires `else` so the grammar wouldn’t be ambiguous: >>> > >>> >>> No, it doesn't. As long as the if's "true block" returns unit. >>> let foo = if ... { }; is perfectly legal, even it doesn't make much sense >>> in practice. >>> >>> Leo >>> >>> _______________________________________________ >>> Rust-dev mailing list >>> [email protected] >>> https://mail.mozilla.org/listinfo/rust-dev >>> >> > > _______________________________________________ > Rust-dev mailing list > [email protected] > https://mail.mozilla.org/listinfo/rust-dev > _______________________________________________ Rust-dev mailing list [email protected] https://mail.mozilla.org/listinfo/rust-dev
