News for hackers. Stuff that matters.
Re:I Want Off Mr. Golang's Wild Ride by rictic on Saturday February 29, 2020 @08:18PM (#22454454)
There is no way to avoid leaking implementation details, it's just a matter of how much you leak. Even monads leak their performance characteristics.
Re:I Want Off Mr. Golang's Wild Ride by whateveracct on Sunday March 01, 2020 @01:35PM (#22458321)
*sometimes and not always

State, for example, doesn't leak. You never worry about the fact that it's a function `s -> (s, a)` and it gets optimized away like nuts.

Re:I Want Off Mr. Golang's Wild Ride by rictic on Monday March 02, 2020 @05:04PM (#22469533)
This is an example in favor of the fact that abstractions can't paper over performance characteristics. Users may depend on them.

In the unlikely event that there was a change to the implementation of the State monad, or to one's compiler, such that the State monad was not optimized away, it would be disruptive to users. It would probably be treated as a bug, even if the only change in behavior was in additional CPU and memory usage.

This is a corollary of Hyrum's Law.