Closed saibotma closed 10 months ago
Yeah it would be a breaking change in any case. I'm anticipating that people are going to migrate from Tuple2
to Records anyways.
The main gain would be that for example IList.splitAt
would then return a record and the caller could then benefit from the new record syntax, which brings destructuring into local variables etc.
Another reason agains having Tuple2
in general is, that there is no Tuple3
or Tuple4
. Prior to Dart 3.0 we had to add https://pub.dev/packages/tuple to our projects which also provides a Tuple2
and would thus cause a name conflict.
From my point of view we should either have support for the whole tuple "spectrum" or remove it completely, because otherwise the user will use a different tuple implementation anyways.
Makes sense not to return Tuple2 anymore.
Should I create a PR for this then?
Dart 3 is nearly mandatory, having a breaking change in revision would be enough and migration does not seems too difficult. It also open the doors to more syntax sugars and new methods. Please send a PR.
Wouldn't that be a breaking change for everyone using Tuple2, and not much to gain from it?