On Thu, Nov 24, 2005 at 12:42:25PM +0100, Juerd wrote:
: Ruud H.G. van Tol skribis 2005-11-24 10:36 (+0100):
: > > it's about expression.
: > Also if [EMAIL PROTECTED] is the multi-dimensional index zip?
: 
: No.
: 
: However, it does feel weird to have an *operator* that makes an array
: behave in a certain way. Well, not weird, because we're used to context,
: but operators usually don't carry their own dedicated context. I think a
: method would be a bit saner.

Hmm?  No, nothing magical going on here, just MMD, insofar as ^
provides a scalar context, so @foo returns [EMAIL PROTECTED], and we can defined
operators however we like on a particular type according to MMD.

: I think that
: 
:     for @foo.indexes { ... }
: 
: is a lot clearer, to everyone, than
: 
:     for [EMAIL PROTECTED] { ... }
: 
: If .indexes turns out to be used a lot, then let's have .i -- "i" for
: "index" is accepted abbreviation, isn't it? (Think for (i = 0; ...;
: ...))

I think it's just .keys.  And maybe .ix is the top level index.  They'd
be synonymous for a single dimensional array or hash.

Larry

Reply via email to