Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

What's the rust name/syntax for non-nil vars?


    let foo = 5; // cannot be null
    let bar = Some(5); // technically also can't be null, but could be None
                       // instead of Some(val)
`foo` has the type `i32` here, and `bar` has the type `Option<i32>`.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: