Maybe I am overlooking something.... But it seems that Tuples boil down to one purpose: Breaking type safety.
Let have a look:
1) You can access by index. But that really rather seems a side effect? I mean accessing by name (as in records) is much better.
2) You have inlined constants (1, 'a', true)
And also inlined constructing from other values: (i, s, b)
But those could same as easily be introduced for records (and be more readable, because you would give the names for the fields):
(num: i; text: s; flag: b)
3) if I understand correctly: You can specify only some fields (leaving out fields at the end)
var t: tuple of (integer, string, boolean);
t:= (1,'ab');
But that would lead to one of 2 possibilities
a) the boolean is simply uninitialized: you can still read it => same for records
b) the tuple has an internal field to remember this, and throws an exception or similar (that would be new)
With records similar solutions could be introduced, if inlined constants/constructs were allowed.
Partial constants/constructs could be allowed
var r: record num: integer; text: string; flag: boolean; end
r := ( num: i; text: s)
The advantage: You could also leave out fields in the middle.
For case (b) you could use null-able types. (not the same but similar)
4) assignment and comparison
Well you can assign and compare records too.
The new part in tuples is
var t: tuple of (integer, string, boolean);
(i,s) := t;
Assigning only part of a tuple.
For comparison that leaves an interesting question " if (i,s) = t then" => can that ever be true, because the tuple (i,s) has a different amount of elements. This would only make sense, if tuples store there "length", i.e. how many of their elements actually got assigned.
Back to assignment:
var t: tuple of (integer, string, boolean);
var x: tuple of (integer, string);
x := t;
This would break type safety. There are 2 different types, so they should not be assignment compatible.
If this is forbidden, then any assigning of a partial tuple needs to be forbidden
(i,s) := t;
Because (i,s) is a type "tuple of (integer, string)" created on the fly.
Well it could also be seen as a partial specified tuple (similar to partial specified record, if that were introduced). Which means that probably specifing an inline constant/construct, needs some syntax to specify the type (rather than having the compiler inferring it).
TMyTuple(i,s) or TMyTuple.create(i,s)
The latter would be odd for left hand side expressions.
---------------------------
Out of interest how would nested tuples work?
var t: tuple of (integer, string, boolean);
var x: tuple of (integer, string);
would that allow
(i,s,f,i,s) := (t,x);
(t, x) := (i,s,f,i,s); // the first tuple must be completely filled, before values for the 2nd can be specified?)
(t, x) := ( (i,s), (f,i,s)); // f goes into t ?
that is would nested tuples just be flattened?
What about:
type t = tuple of (integer, string, boolean);
var x: tuple of (t, string);
Does that even make sense?