? takes a bool, a T, and returns option<T>
true?b == Result b
false?b == None
: takes an Option<T> and a T and returns T
Result x : y == x
None : y == y
However, in most languages (looking at you php) the ?: act as a type of parenthesis: in a?b:c, any expression goes into b, no matter it's precedence.
x ?? y == x // when x is not null null ?? y == y
? takes a bool, a T, and returns option<T>
true?b == Result b
false?b == None
: takes an Option<T> and a T and returns T
Result x : y == x
None : y == y
However, in most languages (looking at you php) the ?: act as a type of parenthesis: in a?b:c, any expression goes into b, no matter it's precedence.