News for hackers. Stuff that matters.
Re:Making a Go program 70% faster with a one character change by aatd86 on Wednesday November 16, 2022 @06:31PM (#33632560)
Ah I see. Why throw exceptions? They could just be noop depending on the typestate?

But still it doesn't look very nice in practice. I think that in that case, it does make much more sense for a mutable type to be a subtype of the immutable one.

The immutable threw me off track. It's just that the supertype would lack mutation operations. (in a sense immutable would be the default for every type).

Thank you.

There are no comments on this comment yet.