On Mon, Jan 28, 2013 at 1:26 AM, Paul Ishenin <paul.ishe...@gmail.com> wrote: > 27.01.13, 1:43, Sven Barth wrote: >> >> Based on the results of the "for-in-index" thread I've decided to come >> up with a draft for the Tuple type which is thought by many people to be >> a better alternative to "for-in-index". > I think it is big overkill to implement a new base type for such a small > task as returning a key in for-in loop. Of course. But note that in this thread, many more uses of tuples (which I do NOT want to make a type -- see my previous mail for lengthy explanation why). Some of the uses are: record and array constructors, adaptation of inconvenient signatures, better support for "return code" style of error handling, etc.
> And (for Michael) I don't see any beauty in this. Imo, initial index > extension is much more beauty than suggested here (a,b,c) := d; > constructions. I have a compromise suggestion: Implement for-index extension with the syntax: for (k, v) in a do this syntax is forward-compatible with both tuples proposals, is simple to do (basically, already done -- only a small change in parsing is required) and will give immediate benefit regardless of outcome of larger discussion. -- Alexander S. Klenin _______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel