Why doesn't `removeLast(_:)` return a value?

Likewise.

Way back in the day there was an effort to fix this, but bad timing meant that it never landed. See Revisiting SE-0132 Rationalizing Sequence end-operation names for more of the backstory.

I believe there are plans to revisit the collection types for other reasons (primarily to allow for non-copyable types) and I’d love to see this get tidied up at the same time. Still, that’s firmly in the realm of Swift Evolution, which isn’t really my bailiwick (but it could be yours :-).

Share and Enjoy

Quinn “The Eskimo!” @ DTS @ Apple

4 Likes