As originally described in the answer to #2, now that there is no possibility to define implicit conversions from Observable<T> to T, preferred way of getting the value out of the optional is via a postfix operator ^:
The main reason for it to be postfix is to allow easy chaining with similar syntax to optional chaining:
// .value is just too long in some cases
let y1 = obj.property.value.whatever.value.sthElse.value
// prefix requires parentheses
let y2 = ^(^(^obj.property).whatever).sthElse
// postfix allows nice chaining
let y3 = obj.property^.whatever^.sthElse^
However, for ^ to really be useful there is probably also need for ^! and ^?, because with optionals you now have to use parentheses, which kind of defeats the whole purpose:
let z = (me.friend^)!.lastName^
As originally described in the answer to #2, now that there is no possibility to define implicit conversions from
Observable<T>toT, preferred way of getting the value out of the optional is via a postfix operator^:The main reason for it to be postfix is to allow easy chaining with similar syntax to optional chaining:
However, for
^to really be useful there is probably also need for^!and^?, because with optionals you now have to use parentheses, which kind of defeats the whole purpose: