Skip to content

Commit

Permalink
Some rewording and one more hyperlink
Browse files Browse the repository at this point in the history
  • Loading branch information
Expurple committed Dec 2, 2024
1 parent 62834f3 commit 5e029ee
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions content/posts/Rust-solves-the-issues-with-exceptions.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
+++
title = 'Rust Solves The Issues With Exceptions'
date = 2024-11-30
lastmod = 2024-12-01
lastmod = 2024-12-02
draft = false
+++

Expand Down Expand Up @@ -182,9 +182,12 @@ Rust gracefully solves these issues by having:
operator](https://doc.rust-lang.org/book/ch09-02-recoverable-errors-with-result.html#a-shortcut-for-propagating-errors-the--operator)
to convert and propagate errors. It makes "dumb" error propagation as
ergonomic as when using exceptions. But it's also explicit and visible in a
code review. In Rust, the equivalent of the `f(g(x))` gotha would look like
`f(g(x)?)?`, clearly marking both points where a jump / early return happens.
- Ergonomic, exhaustive pattern matching, complemented by:
code review. In Rust, the equivalent of that incorrect `f(g(x))` inside a
`try` block would look like `f(g(x)?)?`, clearly marking both points where a
jump / early return happens.
- Ergonomic, exhaustive [pattern
matching](https://doc.rust-lang.org/rust-by-example/flow_control/match.html),
complemented by:
- More syntax sugar like [`if
let`](https://doc.rust-lang.org/rust-by-example/flow_control/if_let.html),
[`while
Expand Down

0 comments on commit 5e029ee

Please sign in to comment.