You'll see the same in Rust
fn example(name: Option<String>) -> Option<usize> {
let name = name?;
Some(name.len())
}
Or fn example(name: Option<String>) {
if let Some(name) = name {
println!("{}", name.len());
}
}
A main difference is the requirement to use `Some`, which allows for the flexibility to apply to any enum.> but since `self.` is implicit
To make sure I'm following, do you mean that Rust's `self.` is implicit in Swift?