Re:From Rust to TypeScript
by fiedzia on Saturday September 12, 2020 @12:56PM
(#24453757)
>How do people using Go and other languages that don't have exceptions solve this reduced readability problem?
Rust has ? operator which converts "let x = foo()?" into "if foo returns Ok(value) assign value to x, otherwise make the function in which it is used return given error". Go doesn't care about readability.
Re:From Rust to TypeScript
by cle on Saturday September 12, 2020 @01:02PM
(#24453798)
Go cares very much about readability. It’s a very subjective topic...because someone doesn’t agree with your opinions on a subjective issue doesn’t mean they don’t care.
Rust has ? operator which converts "let x = foo()?" into "if foo returns Ok(value) assign value to x, otherwise make the function in which it is used return given error". Go doesn't care about readability.