Re: Selecting Components
- From: Georg Bauhaus <bauhaus@xxxxxxxxxxxxx>
- Date: Mon, 09 Jan 2006 01:12:18 +0100
On Sat, 2006-01-07 at 20:24 +0000, Jeffrey R. Carter wrote:
> What would be the consequences if a language were designed so that all
> selections used dot notation, including arrays:
>
> Array.Index
> Array.Index_1, Index_2
> Array.Low .. High
Interesting.
Is "Index_1, Index_2" and expression, or an identifier
as in Pack.Op, Rec.Comp, etc.?
with Index;
....
declare
Index: ...
begin
for k in a'range loop
Result := Result + a.Index.k;
end loop;
end;
For the record, in Eiffel you'd write array @ expr,
Haskell uses array !! expr.
Eiffel uses '.' for object.feature, not as an operator.
Haskell uses '.' for function composition, too, if surrounded
by white space.
.
- Follow-Ups:
- Re: Selecting Components
- From: Jeffrey R. Carter
- Re: Selecting Components
- References:
- Selecting Components
- From: Jeffrey R. Carter
- Selecting Components
- Prev by Date: Beagle 2 (was: Giove-A)
- Next by Date: Re: Selecting Components
- Previous by thread: Re: Selecting Components
- Next by thread: Re: Selecting Components
- Index(es):
Relevant Pages
|
|