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 …
-
-
Seeing the draft, I'm not sure it's practical to retrofit Generics into the lang without making it completely unreadable. The first rule of language design should be: “You got 4 pairs of brackets: (), {}, [] and <>. Use them wisely." A lesson Rust failed to learn, too, though.
-
I tried; I was overruled.
- 3 more replies
New conversation -
-
-
ML-style generics are way weaker than what we're talking about though. I agree they're (comparatively) simple, if you leave out modules. I wanted to keep Rust at that level! It's the extension to a system for expressing type bounds / typeclasses / fundeps where it gets hairy.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
I think more languages should look at ML for a useful example of an incredibly restrictive generics system that's still powerful enough to do most of what you want it to. I think too many people are focused on extremely powerful systems to their detriment.
-
Agreed! Too many people on both sides equate “generics” with “C++’s implementation of generics”. If I were designing Go, given the choice between interfaces and ML-style generics I would have chosen the latter.
- 15 more replies
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.