3 ms·
Not that I disagree that it's a bad example in general if you cannot express the internals in your language using the same language... but I see why they'd do t
by viraptor 16y ago
Not that I disagree that it's a bad example in general if you cannot express the internals in your language using the same language... but I see why they'd do that really. "But not expressive enough to write the standard collections library I guess?" - standard, truly extensive and universal collections library is far from a "common programming patterns" really. If sticking to the type-safety which can be provided right now means weaker or less flexible collections - maybe it's the right tradeoff they made?
For more explanation on why it's needed, here's a good link: http://stackoverflow.com/questions/2454281 http://stackoverflow.com/questions/2454281 ("Since we can't abstract over the variance annotation (yet ;-)) in GenericTraversableTemplate, so that we could have instantiated it to either one depending on the subclass, we have to resort to casting (@uncheckVariance is essentially a kind-cast). ")
- punditator 16y agoIf it is truly the correct tradeoff, then why are they trying so hard to sweep it under the rug? It smacks of intellectual dishonesty.
- sigzero 16y agoGo ask him? Then you can know for sure and let us know too.
- viraptor 16y agoIs it really sweeping under the rug? Not only the author of the bitrot paper himself answered the question on stackoverflow by pointing out the problems, he also gave the impression that they're working on eliminating the limitation: "can't abstract over the variance annotation (yet ;-))" Scala mailing lists are open to everyone ;)