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.https://twitter.com/SeanTAllen/status/1036236006872305665 …
-
-
Agreed. This is where I point to generics as "a standard way we express typed programs" and express some ambivalence. Perhaps a bit like my ambivalence over (say) lambdas. They work, but it seems they introduce a lot of room for mismatched meanings.
-
Can you elaborate on what you mean by mismatched meanings here?
-
User says one thing, means another similar-but-different thing, language feature makes it hard to differentiate / easy to mistake.
-
This right there is the story of generic protocols and Swift. 9 out of 10 people talking about them actually mean existentials (or HKTs), making it almost impossible to start a healthy discussion about (e.g. the possibility of adding) the former in a productive way.

-
I find it interesting that Rust gets so much mileage out of a programming model that lacks HKTs entirely and really eschews existentials.
-
I think this is .. somewhat predictable? I'm no expert but given the quantity of stuff people have been able to encode tolerably-well in System F (plus or minus some sugar/matching support) I'm a bit skeptical about the practical need for points between there and full DT.
-
Also Rust is a lot more than System F, even without higher kinds or first class polymorphism.
-
Formally, I'm quite curious about that! Rust's types went beyond my intentions, but it's not at all clear to me how much "more" it is, vs. a bunch of encoding sugar (eg. traits) that's still formally just System F? Here my "not an expert" hat is to be very prominently exhibited.
- 1 more reply
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.