|
|
|
|
|
by fanf2
2068 days ago
|
|
It looks like Kotlin uses ? for nullable types, which isn’t really anything to do with Rust’s ? for short-cut error handling. https://kotlinlang.org/docs/reference/keyword-reference.html You can also use ? with Option: fn process_item(input: Option<Item>) -> Option<Item> {
let item = input?;
Some(item + 3)
}
|
|
[0] where many conceive of the operation as `?` being a modifying operator to `.`