Re:The Next Step for Generics
by WJW on Tuesday June 16, 2020 @05:30PM
(#23544458)
Sometimes. Often the reduced line counts contain way more complexity per line and understanding it is just as hard. There's something to be said for code churn, as it keeps it fresh in the mind of whomever is on the team right now as opposed to "a guy that left eight years ago wrote this".
[ Parent
| on HN ]
As simple as possible, but no simpler.
I sometimes use the analogy of haiku versus short story.
You can pack a lot of meaning into a haiku, but few will be able to unpack it in the manner intended. A short story can get you to the point without filling a whole book to do so. And a lot more people can write a reasonable short story.
Exactly, the maintenance tax, you have to load the crazy type into your head and once you get to 2 or 3 layers of generics is just painful. C# and typescript both have this.
The question is, what is beyond generics? We need a humane alternative that still provides the type safe guard rails.