[swift-evolution] [SHORT Review] SE-0133: Rename `flatten()` to `joined()`

Dave Abrahams dabrahams at apple.com
Mon Jul 25 15:11:18 CDT 2016


on Sun Jul 24 2016, Chris Lattner <swift-evolution at swift.org> wrote:

> Hello Swift community,
>
> The review of "SE-0133: Rename `flatten()` to `joined()`" begins now
> and runs through July 26.  Apologies for the short review cycle, but
> we’re right up against the end of source breaking changes for Swift 3.
> The proposal is available here:
>
> 	https://github.com/apple/swift-evolution/blob/master/proposals/0133-rename-flatten-to-joined.md
>
> Reviews are an important part of the Swift evolution process. All
> reviews should be sent to the swift-evolution mailing list at
>
> 	https://lists.swift.org/mailman/listinfo/swift-evolution
>
> or, if you would like to keep your feedback private, directly to the review manager.
>
> What goes into a review?
>
> The goal of the review process is to improve the proposal under review
> through constructive criticism and contribute to the direction of
> Swift. When writing your review, here are some questions you might
> want to answer in your review:
>
> 	* What is your evaluation of the proposal?
> 	* Is the problem being addressed significant enough to warrant a change to Swift?
> 	* Does this proposal fit well with the feel and direction of Swift?
> 	* If you have used other languages or libraries with a similar
> feature, how do you feel that this proposal compares to those?
> 	* How much effort did you put into your review? A glance, a quick reading, or an in-depth study?
>
> More information about the Swift evolution process is available at
>
> 	https://github.com/apple/swift-evolution/blob/master/process.md

I'm giving the overall idea a +0 and the specific proposal as currently
written a -1, because I think this is a much more complicated bikeshed
than it appears to be on the surface and the proposal doesn't begin to
address the issues.  Specifically, I'm concerned about these points:

* `flatten` works on Optional<Optional<T>> and sequences of Optional<T>.
  How does it make sense to rename these operations “join?”

* The name and semantics of `flatten` is linked to that of `flatMap`.
  It's almost impossible to explain what `flatMap` does without
  reference to `flatten`.  Will it make sense to explain `flatMap` in
  terms of `joined`?

* `flatten` is a functional term of art in the same family as `flatMap`.
  We have good reasons to consider changing some of the other names in
  this family, such as `filter` and `reduce`, but that idea has met with
  significant resistance on the list.  How far should we go?  Does it
  make sense to make this one change alone?

I could be convinced to change my evaluation of the proposal if there
are good answers to these questions, but until then, I'm not won over.

-- 
Dave



More information about the swift-evolution mailing list