Follow

I've just realized that has eliminated defensive coding for me.

Defensive coding is "I know it's not supposed to be `null`, but I'll check just in case" or "I know the caller isn't supposed to mutate or free this object, but I'll make a copy just in case" or "I know that function should be thread-safe, but I'll avoid threads just in case"

In Rust nullability, mutability and thread-safety are encoded in types, so I never have to second-guess them.

Sign in to participate in the conversation
Mastodon

Server run by the main developers of the project 🐘 It is not focused on any particular niche interest - everyone is welcome as long as you follow our code of conduct!