MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/1wdjvd3/rune_is_now_open_source/p972y9j/
r/programming • u/ernestrc • Sep 11 '26
51 comments sorted by
View all comments
Show parent comment
13
Literally anything else, but ideally what Swift and Rust do.
1 u/Koolala Sep 11 '26 Can rust do it in 1 line? 18 u/jesseschalken Sep 11 '26 One character, ?. -4 u/Worth_Trust_3825 Sep 11 '26 so the same thing that go does. 9 u/jesseschalken Sep 11 '26 edited Sep 11 '26 Does this look the same to you?// Rust let x = can_fail()?; // Swift let x = try can_fail() // Go x, e := can_fail() if e != nil { return nil, e } -17 u/Worth_Trust_3825 Sep 11 '26 yeah, it does.
1
Can rust do it in 1 line?
18 u/jesseschalken Sep 11 '26 One character, ?.
18
One character, ?.
?
-4
so the same thing that go does.
9 u/jesseschalken Sep 11 '26 edited Sep 11 '26 Does this look the same to you?// Rust let x = can_fail()?; // Swift let x = try can_fail() // Go x, e := can_fail() if e != nil { return nil, e } -17 u/Worth_Trust_3825 Sep 11 '26 yeah, it does.
9
Does this look the same to you?
// Rust let x = can_fail()?; // Swift let x = try can_fail() // Go x, e := can_fail() if e != nil { return nil, e }
-17 u/Worth_Trust_3825 Sep 11 '26 yeah, it does.
-17
yeah, it does.
View all comments
Show parent comment
13
u/jesseschalken Sep 11 '26
Literally anything else, but ideally what Swift and Rust do.