[fpc-devel] for-in-index loop
Alexander Klenin
klenin at gmail.com
Sat Jan 26 13:17:25 CET 2013
On Sat, Jan 26, 2013 at 3:14 PM, Hans-Peter Diettrich
<DrDiettrich1 at aol.com> wrote:
> Alexander Klenin schrieb:
>> 2) Indeed, introducing tuples to Pascal might be an alternative
>> solution. Below is a proposal:
>> 2.1) Tuple definition. Tuple is an anonymous list of values, possibly
>> of different types.
>
>
> OPL: array of Variant.
> Also: Open Array.
>
> Where both are slow and clumsy to use, violating the principle of
> strictly typed languages.
I think you meant "array of const" instead of "open array", since open array is
just a method to pass arbitrary-sized array (of a single element type,
of course).
As for array of Vaiant and array of const -- they are very different
from the tuples proposal.
Note that tuples proposal is carefully constructed in such a way that
tuples are statically (but implicitly)
typed, so no run-time overhead is involved, and all type errors are
detected at compile-time.
--
Alexander S. Klenin
More information about the fpc-devel
mailing list