KyNorthstar.me
I was learning some Rust last year, and it's the first language I've seen that finally gave up inheritance.
I was learning some Rust last year, and it's the first language I've seen that finally gave up inheritance.
dang it, this blog post is taking longer than I expected lol
dang it, this blog post is taking longer than I expected lol
Which is nice because that means someone who doesn't know this won't accidentally crash the program cuz they won't use it
Which is nice because that means someone who doesn't know this won't accidentally crash the program cuz they won't use it
Second, Swift makes it very clear when something’s going to crash by requiring an `!` or saying things like “fatalError()”. Your program won't crash because you called any old method; it'll crash because you told it to crash.
No `!`s, no crash
Second, Swift makes it very clear when something’s going to crash by requiring an `!` or saying things like “fatalError()”. Your program won't crash because you called any old method; it'll crash because you told it to crash.
No `!`s, no crash
Rust has many ways to get the value or error in `Result`, including `expect()` and `unwrap()`, both of which crash the program if the `Result` contains an error.
Swift's `Result` has no crashing APIs at all
Rust has many ways to get the value or error in `Result`, including `expect()` and `unwrap()`, both of which crash the program if the `Result` contains an error.
Swift's `Result` has no crashing APIs at all