> It's called the "if" clause.
If we got rid of everything we don't absolutely need in programming, we would have to get rid of 98% of Swift syntax, and probably every modern programming language including Swift.
I started off with machine language, in embedded systems. You can't get much more "raw" than that.
I have been writing Swift exclusively for a long time. I speak it without an accent. It's my beauty.
But I also know that you can have so much sugar you fall into a diabetic coma.
Exactly my feelings. Same thing here started from machine code and now doing everything else including kitchen sink
Type in a bunch of numbers, then set the PC to 0.
Assembler was great after that.
I do not remember that stuff fondly. It sucked.
"If" is often a statement, not an expression, so they aren't equivalent in a lot of cases. I'm not sure if this is the case in Swift, but I'm fairly certain that Swift's '?' operator also does unwrapping and propagation, similar to '?' in Rust.
Giving the developer succinct ways to prevent program failure from unexpectedly undefined values is a feature.