Abstracting away correctness (2020)
fasterthanli.me
fasterthanli.me
I guess the good design was the friends we made along the way.
So your comment doesn't ring true in this case imo
The limitations of the language result in interfaces that are pretty easy to misuse due to unenforceable invariants, and not in theoretical ways either, which I think is the opposite of simple.
Here is his tl;dr from the bottom. (Admittedly, a violation of BLUF)
* There are significant design flaws in Go, both the language and the standard library, that enable entire classes of bugs that have very real consequences.
* These flaws are not immediately obvious to everyone - which is fine - so we took a very long and detailed look at them, one by one.
* These flaws are not unavoidable - the situation is not desperate. *It doesn't have to be like this.*
* There has been progress in enabling misuse-resistant design, and I strongly encourage you to learn about it, even if it turns out you can't use those novel languages, because some of the techniques can be applied to classical languages as well.
> var _ AltReader = (*AltReadWrapper)(nil)
I understand why, but I still find the idiom funny and clunky.