You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Why `enum` is considered a core feature of the language?
98
+
- How Rust `enum`s could save us during standard project refactors/library usages, which wouldn't be as safe in some other languages?
99
+
- People find Rust `enum`s convenient, to the degree where they miss this feature in other languages. What makes them so convenient?
100
+
- Let's see an example of a file with a big enum. Is the file readable? How is that balanced versus type safety?
101
+
-[Implementation](https://github.com/rust-lang/rust/blob/master/compiler/rustc_const_eval/src/interpret/step.rs) of doing a single step in calculations of const values in the compiler.
102
+
85
103
## Pattern matching
86
104
87
105
Pattern matching is a powerful feature of Rust and many functional languages, but it's slowly making
@@ -96,6 +114,28 @@ So how do we handle situations which can fail? That's where the `Result` type co
- So, why would the approach with `Result` be any cleaner than exceptions?
120
+
- Are there any other benefits of using this approach rather than exceptions?
121
+
- Look into the following libraries, are those interfaces convenient? How is that balanced versus type safety?
122
+
-[Examples of CLI parsing](https://github.com/clap-rs/clap/tree/master/examples/tutorial_derive) from `clap` repository,
123
+
-[README.md](https://github.com/serde-rs/json) with examples of the interface of JSON serialization/deserialization library,
124
+
-[Documentation](https://doc.rust-lang.org/std/path/struct.Path.html) of filesystem path handling from the standard library,
125
+
-[Implementation](https://github.com/BurntSushi/ripgrep/blob/master/crates/grep/examples/simplegrep.rs) of a third-party well-liked app [`ripgrep`](https://github.com/BurntSushi/ripgrep) written in Rust.
0 commit comments