[swift-evolution] [SR-933] Rename flatten to flattened

Haravikk swift-evolution at haravikk.me
Sat Apr 9 04:03:16 CDT 2016

> On 9 Apr 2016, at 01:32, Brent Royal-Gordon via swift-evolution <swift-evolution at swift.org> wrote:
> `flatten` is nowhere near as weak a term of art as `takeWhile`, but I think it still falls towards that end of the spectrum. We shouldn't worry too much about changing it. `map`, `reduce`, and `filter` are much stronger terms, and we should be more cautious about changing them.

I still don’t see what’s being lost here, it’s not like the proposal is to radically rename them, all we’d end up with is .mapped(), .flattened(), .filtered() etc., which any good search engine should still be able to find, and will still come up in auto-completion if you start typing .map, .flatten and so-on. I just don’t see the point of even having naming conventions if we allow outside influences to force exceptions for IMO fairly weak reasons; it amounts to the “because everyone else is doing it” reasoning, but again, it’s not as if someone used to using .map is going to be suddenly lost and confused when presented with .mapped() instead.

More information about the swift-evolution mailing list