> -----Original Message-----
> From: Jonathan Scott Duff [mailto:[EMAIL PROTECTED]
> Sent: Thursday, January 22, 2004 1:16 PM
> To: Austin Hastings
> Cc: Larry Wall; Language List
> Subject: Re: Semantics of vector operations (Damian)
>
>
> On Thu, Jan 22, 2004 at 01:10:23PM -0500, Austin Hastings wrote:
> > In reverse order:
> >
> > >     %languageometer.values ?+= rand;
> >
> > This is the same as
> >
> >      all( %languageometer.values ) += rand;
> >
> > right?
>
> It's the same as
>
>       $r = rand;
>       $_ += $r for %languageometer.values
>
> Your junction looks like it should work but I think you're really
> adding the random number to the junction, not the elements that compose
> the junction thus none of %languageometer.values are modified.

It would be disappointing if junctions could not be lvalues.

> > And is this
> >
> > >     %languageometer.values ?+=? rand;
> >
> > the same as
> >
> >     all( %languageometer.values ) += one( rand );
>
> I don't think so.  It's like:
>
>       $_ += rand for %languageometer.values
>
> perhaps if you had:
>
>       $j |= rand for (0..%languageometer.values)
>       any(%languageometer.values) += $j;
>
> Though I'm not sure what that would mean.
>
> I don't think junctions apply at all in vectorization.   They seem to
> be completely orthogonal.

I'm curious if that's true, of if they're two different ways of getting to
the same data. (At least in the one-dimension case.)

=Austin

Reply via email to