---
title: "Comment by Brett Rowberry on \"From High-Level to Systems Programming: A Practical Guide to Rust\" | Hashnode"
description: "Hashnode prompted me to make this comment. Very accessible! It wasn&#39;t clear to me why ? is needed here: fn main () { let result = divide( 10 , 2 )?; println"
url: "https://hashnode.com/posts/from-high-level-to-systems-programming-a-practical-guide-to-rust/63b2e6d2c6078e6529fcef31/comment/63c1a6078bdf402592caae4c"
---

[Discussion](https://hashnode.com/posts/from-high-level-to-systems-programming-a-practical-guide-to-rust/63b2e6d2c6078e6529fcef31)

Comment [From High-Level to Systems Programming: A Practical Guide to Rust](https://hashnode.com/posts/from-high-level-to-systems-programming-a-practical-guide-to-rust/63b2e6d2c6078e6529fcef31)

[Brett Rowberry](https://hashnode.com/@brettrowberry)

[Jan 13, 2023](https://hashnode.com/posts/from-high-level-to-systems-programming-a-practical-guide-to-rust/63b2e6d2c6078e6529fcef31/comment/63c1a6078bdf402592caae4c)

Hashnode prompted me to make this comment. Very accessible! It wasn't clear to me why `?` is needed here:

```
fn main() {
    let result = divide(10, 2)?;
    println!("The result is {}", result);
}
```

What happens without it?

[Ben Greenberg](https://hashnode.com/@hummusonrails)

[Jan 13, 2023](https://hashnode.com/posts/from-high-level-to-systems-programming-a-practical-guide-to-rust/63b2e6d2c6078e6529fcef31/comment/63c1a6078bdf402592caae4c#reply-63c1ad4a8bdf402592caaf3a)

The `?` operator is used to unwrap a `Result` and either show the error, if there is one, or the value if it was successful. You can write the same thing out in long form, but since it was such a common operation this shorthand was introduced into the language.

You can read more about the operator in the docs, for example here: [doc.rust-lang.org/rust-by-example/std/result/ques…](https://doc.rust-lang.org/rust-by-example/std/result/question_mark.html#)
