[swift-evolution] [Review] SE-0093: Adding a public base property to slices
Kevin Ballard
kevin at sb.org
Mon May 23 17:08:17 CDT 2016
On Thu, May 19, 2016, at 04:43 PM, Dave Abrahams via swift-evolution wrote:
> * What is your evaluation of the proposal?
The motivation sounds reasonable, as does the solution. But it seems odd to expose a property `base` on MutableRandomAccessSlice without exposing it on any other slice type. I'd much rather expose it everywhere, ideally by renaming the `_base` property as suggested in the alternatives section. Stdlib breakage can be handled on a temporary basis by providing the `_base` accessor as a computed property that returns `base`, though of course the goal should be to remove this entirely (or hopefully not have it at all if there's not too much stdlib breakage). And such a change should still be purely additive from the perspective of third-party code.
> * Is the problem being addressed significant enough to warrant a
> change to Swift?
Yes. This is a relatively minor change but it allows for better performance.
> * Does this proposal fit well with the feel and direction of
> Swift?
Yes.
> * If you have used other languages or libraries with a similar
> feature, how do you feel that this proposal compares to those?
I can't think of any languages with this offhand.
> * How much effort did you put into your review? A glance, a
> quick reading, or an in-depth study?
A quick reading.
-Kevin Ballard
More information about the swift-evolution
mailing list