# Public review of the Standard Library APIs \[Closed\]

**URL:** <https://discuss.kotlinlang.org/t/public-review-of-the-standard-library-apis-closed/1362>\
**Category:** Libraries\
**Created:** [December 17, 2015, 1:32pm UTC](https://discuss.kotlinlang.org/t/public-review-of-the-standard-library-apis-closed/1362 "2015-12-17T13:32:41Z")\
**Posts on this page:** 1\
**Showing post:** 76

<div class="post-metadata">

**Author:** ![ilya.gorbunov](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/ilya.gorbunov/32/1645_2.png) [@ilya.gorbunov](https://discuss.kotlinlang.org/u/ilya.gorbunov)\
**Post date:** [January 20, 2016, 5:38pm UTC](https://discuss.kotlinlang.org/t/public-review-of-the-standard-library-apis-closed/1362/76 "2016-01-20T17:38:51Z")

</div>

> [@pniederw1](#):
>
> So result.groups[3]!!.value == result.groupValues[2]? Sounds like asking for trouble to me (very similar looks/names, incompatible indices).

After some discussion, we have decided not to drop zeroth group from the `groupValues` list, so that the same index value would refer to the same group both in `groups` and in `groupValues`.

The downside of this decision is that the `groupValues` list becomes less convenient for [destructuring assignment](https://kotlinlang.org/docs/reference/multi-declarations.html#destructuring-declarations). An intended way to destructure no longer works:  
`val (group1, group2) = match.groupValues`, because the first value now is the match value itself and not the first group value.

In order to make destructuring assignment possible, we’re introducing another property `MatchResult.destructured`, which only provides `component1`, `component2` … `component10` methods to satisfy the destructuring convention. Thus the usage would be:  
`val (group1, group2) = match.destructured`

---

_[View the full topic](https://discuss.kotlinlang.org/t/public-review-of-the-standard-library-apis-closed/1362)._
