"Douglas A. Gwyn" <DAGwyn@[EMAIL PROTECTED]
> wrote in message
news:47602631.DC2BEDE@[EMAIL PROTECTED]
> cr88192 wrote:
>> 'Alef' was also mentioned, and is interesting.
>> the 'tupple' type is interesting, ...
>
> I think Alef has pretty much vanished, but Limbo (the main
> language for Inferno) has nice sup****t for tuples.
yes, ok.
actually, I had thought some about tupples.
they could be implemented in a C compiler, and could have a few uses
(though
mostly as syntactic sugarring).
likely, in the implementation, such a tupple would be regarded as
essentially the same as a struct (though, given the different usage
patterns, may have different treatment of member size/alignment,
resembling
an args list rather than a memory object, or, potentially, they could have
the same memory layout as structs).
alternatively, they need not be real types, but merely a syntactic
shorthand
(for example, for struct construction/destructuring). however, absent
adornment, they would cost in terms of parsing (with adornment, absent
destructuring syntax, they would not really offer anything over structs).
as such, about the only really compelling feature would be destructuring
syntax, for example:
struct { float x, y; }v;
float f, g;
(f, g)=v;
however, at this point, for other reasons, I am not likely to implement
any
of this (during the process of rewriting the upper compiler, the syntax is
essentially locked down in both the old and new upper compilers).


|