ilya.gorbunov
02/13/2018, 2:38 PMWhat's the point of having a separate wrapper for desctructuring?The wrapper changes the group numbering, so that
component1
corresponds to the group with index 1, rather than 0.
We had experimented with the design when MatchResult
can be destructured immediately, but found that very confusing https://discuss.kotlinlang.org/t/public-review-of-the-standard-library-apis-closed/1362/76voddan
02/13/2018, 5:00 PMtext.replace(){ (_, first, second) -> }
is much better than no lambda destructuring at all_
were not even talked about, despite them being on the table at the times of 1.0.