[Enhancement] Rename Turple to Pair
It feels like the more appropriate name for a general struct with 2 values is Pair not Tuple.
I hope that this change wouldn't affect any current codebase due to rarety usage of tuple types.
It is also would be nice to see Quad which holds 4 values.
Set up a poll on the discord for it perhaps?
Set up a poll on the discord for it perhaps?
Good idea.
To add more suport for struct-types, these kind of methods could be added:
macro void Pair.@decompose(&self, Type1 #var1, Type2 #var2)
{
#var1 = self.first;
#var2 = self.second;
}
macro void Pair.@restruct(&self, #struct, #field_name1, #field_name2)
{
#struct.$eval(#field_name1) = self.first;
#struct.$eval(#field_name2) = self.second;
}
I am getting confused by the symbols soup here. I hope it serves a good purpose once learnt. :D
This is not code you should normally write @Ccocconut