Maybe I'm missing something but I can't pair a with an runtime object as one of the pairs of the tuple since the Tuple2 constructor is const. This completely misses the point then of why you would use a Tuple in the first place. Am I missing something?
e.g.
class Dog
{
String name;
}
enum Action
{
Walk, Wash, Play, Feed
}
void main()
{
var myDog = new Dog();
var myFancyTuple = Tuple2<Dog, Action>(myDog, Action.Feed); <- Invalid since class myDog is not a const.
}
Maybe I'm missing something but I can't pair a with an runtime object as one of the pairs of the tuple since the Tuple2 constructor is const. This completely misses the point then of why you would use a Tuple in the first place. Am I missing something?
e.g.
class Dog { String name; }
enum Action { Walk, Wash, Play, Feed }
void main() { var myDog = new Dog(); var myFancyTuple = Tuple2<Dog, Action>(myDog, Action.Feed); <- Invalid since class myDog is not a const. }