Michael Van Canneyt wrote:

After a first read, looks OK. You seem to have thought of everything that needs to be described, except maybe extraction of a single element:

b : tuple of (integer, integer);
a : integer;

begin
  b:=(1,2);
  a:=b[0]; // a = 1 after this.
end;

In this sense, it seems more like an array of const than as a record.

I would not do the extensions. The tuple is simply a logical, immutable grouping of values. I would also not allow operators other than := <> and =, because in expressions,
when encountering a (, it is not clear what is meant.

But provided that single-element tuples aren't allowed there'll be a recognisable comma.

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]
_______________________________________________
fpc-devel maillist  -  [email protected]
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to