News for hackers. Stuff that matters.
Re:Rust for Web by tpush on Sunday January 31, 2016 @03:10PM (#11007823)
Maybe I'm misunderstanding you, but why wouldn't it work in an expression based language?

Isn't

  if let pat = expr1 { expr2 }
just syntactic sugar for

  match expr1 {
    pat => { expr2 }
    _ => { }
meaning the type of expr2 must be unit, and thusly if let is always of unit type?
Re:Rust for Web by CuriousSkeptic on Sunday January 31, 2016 @07:13PM (#11008812)
Granted. But a unit expression is only useful for its side effect so I guess I put that in the gray area between paradigms, not really in the spirit of only evaluating expressions. Which brings us back the point of my comment: It's almost certainly a bad idea.
Re:Rust for Web by sedatk on Sunday January 31, 2016 @09:30PM (#11009297)
The unhandled case is explicitly mentioned in the latter though.