Conversation

I won’t @ them but limiting expressivity in order to limit cognitive load and keep codebases approachable is a totally legitimate move in language design. I’d even say essential. It’s all about balance, and expressivity _does_ have tradeoffs.
Quote Tweet
Almost all the arguments I see against generics in go are pretty awful. "People might create abstractions I can't understand" is an awful argument. And that's the root of most argument I see. That's so broad that you can apply it to the base language itself. Don't @ me.
Show this thread
9
126
In the case of generics, the cost of leaving out even simple generics has a high cognitive load cost. I have no problem with taking it slow and conservative; that's a reasonable place for them. But the koans and zealous arguments against generics disrupt the design process.
2
9
Ahhh right. Yeah, I'm cool with saying 'it's a hard design problem', but it can be a challenge to communicate the nuance of this to the language users/fans. Same thing goes with Elm and bounded polymorphism.
1
I have no problem whatsoever with languages trying different spots on the curve-bending space. Interestingly, Rust's "koans", such as they are, all *encode* the Rust value for finding ways to bend tradeoff curves (the "X without Y" template). It helps with nuance, ime.
1
1
> “nothing went in [to the language], until all three of us [Ken, Robert and myself], agreed that it was a good idea.” — Rob Pike, Gophercon 2014 This is great, but as you said, it doesn't help other people understand what goes into thinking or help them be a part of the process
1