[fpc-devel] RFC: Support for new type "tuple" v0.1

Sven Barth pascaldragon at googlemail.com
Sat Jan 26 18:59:58 CET 2013


On 26.01.2013 18:52, Marco van de Voort wrote:
> In our previous episode, Sven Barth said:
>> up with a draft for the Tuple type which is thought by many people to be
>> a better alternative to "for-in-index".
>>
>> Please note the following points:
>> * This is not the final specification for Tuples and thus open to
>> discussion (there are still some issues with this draft that need to be
>> solved)
>> * I won't implement this feature myself (at least not in the near
>> future) as I have other topics on my list (most importantly generics
>> once type helpers are commited), so Alexander is free to give the task
>> for implementation to his student.
>
> In a quick read, I cannot see any limitations to the type used for
> a tuple-element except that it behaves like "file of..."
>
> So that would mean a record type (or other non variant compatible type)
> would qualify?

Whether there should be restrictions of types could be added to the open 
issues as I'd want to have at least equality operators working for 
tuples and thus we need to think about something for records... (as a 
solution one could require that a "=" operator for records must be in scope)

But without that problem in mind I had wanted to allow every type for 
tuple elements (even tuples).

Out of curiosity: Do you see this positive or negative?

Regards,
Sven



More information about the fpc-devel mailing list