[swift-evolution] [SHORT Review] SE-0133: Rename `flatten()` to `joined()`
koher at koherent.org
Mon Jul 25 09:42:41 CDT 2016
> What is your evaluation of the proposal?
- Certainly `flatten` and `joined` work similarly. I think, however,
the concepts behind them are different. When I use `flatten`, I want
to make nested monads flat. When I use `joined`, I want to concatenate
sequences, mainly `String`s, with a separator. So it is clearer for me
that `flatten` is separated from `joined`.
- `flatMap` means `map` + `flatten`. I feel `flatMap` with `joined`
does not make sense.
> Is the problem being addressed significant enough to warrant a change to Swift?
No. It is not a problem for me as described above.
> Does this proposal fit well with the feel and direction of Swift?
I think proposed `joined` itself fits with the feel of Swift but it is
not the direction of Swift. It can cause problems to unite things
which just look similar ignoring the concepts behind them.
> If you have used other languages or libraries with a similar feature, how do you feel that this proposal compares to those?
Kotlin has `flatten` and `flatMap`. Although Haskell has `join` as
`flatten`, it's `flatMap` is named `>>=` (bind).
I don't know any languages which have a combination of `joined` and
`flatMap`. I feel it is strange.
> How much effort did you put into your review? A glance, a quick reading, or an in-depth study?
A quick reading the thread.
-- Yuta Koshizawa
2016-07-25 15:10 GMT+09:00 Chris Lattner via swift-evolution
<swift-evolution at swift.org>:
> 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:
> Reviews are an important part of the Swift evolution process. All reviews should be sent to the swift-evolution mailing list at
> 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
> Thank you,
> -Chris Lattner
> Review Manager
> swift-evolution mailing list
> swift-evolution at swift.org
More information about the swift-evolution