It might look a bit confusing at times tho. Some examples: let data: MyStruct = fs:: read_to_string(p)?@?; let data: MyStruct = fs:: read_to_string(p)?#?; let data: MyStruct = fs:: read_to_string(p)?%?;
Ohh, actually maybe this could be part of type ascription itself? let data = fs::read_to_string(p)? : MyStruct?; Ascribed as a fallible conversion!
-
-
Okay, yeah I like this a lot actually. I think that if you know `?` is for attempting stuff, and ` : ` is for annotating types, then this looks reasonably intuitive!
Show this thread -
New conversation -
-
-
that's going to be odd because some languages use `?:` for a short-hand ternary operator
-
I feel that ship has more or less sailed already as both `?` and `:` are (set to be) meaningful, and will most likely be used in conjunction reasonably often.
- 4 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.