[Pitch] Have all adapters in the standard library uniformly expose their `base`

That's not why, of course; we are all suspicious of fully retroactive conformances. But it's what I need to do to fill practical need and is just one example of a problem that keeps coming up for me in various forms: the standard library fails to expose the maximum useful API.

And sure, in this particular case there's something the standard library should change so I don't have to do this. Of course, that's going to be pretty unsatisfying too until this problem is fixed (there's no reasonable way to make a Collection wrapper that conditionally conforms to BidirectionalCollection when its wrapped base does). And that in turn is waiting on a fix for the language semantics. That could be years in the making, if it ever comes. So, yeah, in the meantime I'd appreciate it if the library would at least not make useful information inaccessible.

( EnumeratedSequence is 83 lines of code, about half of which are doc comments. Duplicating it is definitely annoying, but I don't really see how it's a huge hardship...)

You've gotta be kiddin' me, brother! Extended to all the adapters in the standard library, that negates the whole point of libraries, to say nothing of the standard library.

Edit: Apologies if I'm coming across as overly cranky here.

Be as cranky as you like; I can definitely out-crank you. The sentiments you're expressing are in direct conflict with my original design intentions for the standard library, so not particularly easy to swallow. I do of course accept that I have no say over these things anymore, though…

6 Likes