News for hackers. Stuff that matters.
Re:The Early History of F# [pdf] by Verdex on Tuesday January 15, 2019 @12:29PM (#18912938)
Strong agree on the "but this isn't how OOP typically works" part.

I think one of the reasons that Rust doesn't have a traditional OO model is because you can't actually enforce mutability controls in that way. At the very least, when I tried to think of how I would find a way to enforce mutable and immutable data using java / c# style OO, I couldn't think of a way that wasn't kind of crazy or hard to use. On the other hand, structs with traits is actually pretty easy to enforce immutable data (hey, this requires a mutable borrow and what you have is an immutable borrow, so compile error).

There are no comments on this comment yet.