Re: a syntax derived from constant-time hash-based n-dim matrices in perl 5

2000-09-02 Thread c . soeller
"David L. Nicol" wrote: > > Nathan Wiger wrote: > > > Well, this is not bad, only it's not without its problems. Say you > > wanted to get your indices implicitly: > > > > @a[getindices()]; > > @a[$r->get_x, $r->get_y]; > > @a["@{\(getindices())}"]; > @a[join $",$r->ge

Re: a syntax derived from constant-time hash-based n-dim matrices in perl 5

2000-09-01 Thread David L. Nicol
Nathan Wiger wrote: > I don't think array indices > are something that we should have to go to such lengths to get. I'd > rather have a somewhat-confusing ; or , based syntax than the above. If > anything that's *more* confusing and harder to read. > > -Nate you're right. What if they both wo

Re: a syntax derived from constant-time hash-based n-dim matrices in perl 5

2000-09-01 Thread Karl Glazebrook
"David L. Nicol" wrote: > > Nathan Wiger wrote: > > > Well, this is not bad, only it's not without its problems. Say you > > wanted to get your indices implicitly: > > > > @a[getindices()]; > > @a[$r->get_x, $r->get_y]; > > @a["@{\(getindices())}"]; > @a[join $",$r->ge

Re: a syntax derived from constant-time hash-based n-dim matrices in perl 5

2000-09-01 Thread Nathan Wiger
"David L. Nicol" wrote: > > @a["@{\(getindices())}"]; > @a[join $",$r->get_x, $r->get_y]; My point exactly by these statements: > > Either of these could return an arrayref, but forcing quotes around them > > means you'll need inbetweener variables or the @{} construct, neither

Re: a syntax derived from constant-time hash-based n-dim matrices in perl 5

2000-09-01 Thread David L. Nicol
Nathan Wiger wrote: > Well, this is not bad, only it's not without its problems. Say you > wanted to get your indices implicitly: > > @a[getindices()]; > @a[$r->get_x, $r->get_y]; @a["@{\(getindices())}"]; @a[join $",$r->get_x, $r->get_y]; > Either of these could ret

Re: a syntax derived from constant-time hash-based n-dim matrices in perl 5

2000-08-31 Thread Nathan Wiger
"David L. Nicol" wrote: > > > One problem that immediately jumps out at me is how to do this: > > > >@a[[@x], [@y]]; > > I think I dealt with that in the next paragraph, suggesting > > @a["@x","@y"] Well, this is not bad, only it's not without its problems. Say you wanted to get you

Re: a syntax derived from constant-time hash-based n-dim matrices in perl 5

2000-08-31 Thread David L. Nicol
Nathan Wiger wrote: > > "David L. Nicol" wrote: > > > > @a["$i $j $k","$a $y $z"] # two points in DN n-dim syntax > > One problem that immediately jumps out at me is how to do this: > >@a[[@x], [@y]]; > > That is, dynamically get your indices. The above seems ok when you know

Re: a syntax derived from constant-time hash-based n-dim matrices in perl 5

2000-08-31 Thread Nathan Wiger
"David L. Nicol" wrote: > > @a["$i $j $k","$a $y $z"] # two points in DN n-dim syntax One problem that immediately jumps out at me is how to do this: @a[[@x], [@y]]; That is, dynamically get your indices. The above seems ok when you know them in advance (at least what variables