On 12-08-23 7:04 PM, Jeffery Olson wrote:
As a C# developer, I definitely do *agree* with the above statement.
Simultaneously, Option<T> doesn't solve all of our problems.
Putting aside whether this is a troll on Scala devs, considering the following:
http://beust.com/weblog/2012/08/19/a-note-on-null-pointers/
"...but don’t listen to people who tell you that because you are no
longer seeing any null pointer exceptions, your code is safer. It’s
not. You still have to fix your bugs."
Yes and no. I agree that it's not a panacea; you can obviously still
have a malformed value. But static refinement of an X-or-Y type into
independent just-X, just-Y, and X-or-Y types does help you notice (and
eliminate) cases where you mean one and not the other. Any time you
constrain your statically legal state-space, you tend to kill off a big
chunk of bugs.
(Nonexistent state-space, like not-written code, carries no bugs :)
-Graydon
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev