Re: Semantics of vector operations (Damian)

2004-06-14 Thread Damian Conway
Scott wrote: I'm just waiting for Damian to speak up :-) I'm not at all comfortable with the notion of junctions as lvalues. I've *always* considered a junction to be a special kind of constant, just as a number or a string or a reference is. I have trouble with junctive lvalues because I think

Re: Semantics of vector operations (Damian)

2004-06-14 Thread Austin Hastings
--- Damian Conway [EMAIL PROTECTED] wrote: Date: Wed, 28 Jan 2004 12:34:15 +1100 From: Damian Conway [EMAIL PROTECTED] Add to Address Book To: Language List [EMAIL PROTECTED] Subject: Re: Semantics of vector operations (Damian) Messages are *not* guaranteed to arrive in the order sent

Re: Semantics of vector operations (Damian)

2004-06-14 Thread Matthew Walton
Austin Hastings wrote: Perhaps we could consider the junctive lvalues as a sort of implied ?= operation: junction(@list) = value means unless junction(@list) == value { given junction { when 'none' { (@list.grep value) = undef; } when 'any' { for 0 .. random(@list) {

Re: Semantics of vector operations (Damian)

2004-06-14 Thread Mark J. Reed
On 2004-06-14 at 22:58:58, Matthew Walton wrote: 'it would be better to explicitly just say (@list.grep value) = undef although I think that might be supposed to be (@list.grep value) »= undef; Those do different things according to my understanding. The first removes all matching

Re: Semantics of vector operations (Damian)

2004-06-14 Thread Matthew Walton
Mark J. Reed wrote: On 2004-06-14 at 22:58:58, Matthew Walton wrote: 'it would be better to explicitly just say (@list.grep value) = undef although I think that might be supposed to be (@list.grep value) »= undef; Those do different things according to my understanding. The first removes all

Re: Semantics of vector operations (Damian)

2004-06-14 Thread George Woolley
Well, I'd speak up for intentionally allowing some silly alternatives except that's IMO unnecessary. With all the apparently-wonderful new possibilities which we'll soon have (OK, maybe not as soon as we'd like), it seems most likely that some will turn out to be silly. George tim toady On

Re: Semantics of vector operations (Damian)

2004-02-09 Thread Smylers
Austin Hastings writes: With Larry's new vectorized sides suggestion, putting a guillemot on the right side of the operator ... Austin, we've been through this before -- kindly return that guillemot to wherever you picked it up from. It's hassle enough having unicode in Perl, without us all

RE: Semantics of vector operations (Damian)

2004-01-22 Thread Austin Hastings
-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

Re: Semantics of vector operations (Damian)

2004-01-22 Thread Jonathan Scott Duff
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

Re: Semantics of vector operations (Damian)

2004-01-22 Thread Luke Palmer
Austin Hastings writes: Sortof. I think Larry was implying that rand returned an infinite list of random numbers in list context. If not, then what he said was wrong, because it would be sick to say that: (1,2,3,4,5) + foo() Calls foo() 5 times. Why would it be sick, and

Re: Semantics of vector operations (Damian)

2004-01-22 Thread Luke Palmer
Luke Palmer writes: (1,2,3,4,5) + foo() # Maybe the same as above? What does infix:+(@list,$scalar) do? Well, what does a list return in scalar context? In the presence of the C comma, it returns 5 for the last thing evaluated. In its absence, it returns 5 for the length.

Re: Semantics of vector operations (Damian)

2004-01-22 Thread Jonathan Scott Duff
On Thu, Jan 22, 2004 at 01:28:42PM -0500, Austin Hastings wrote: From: Jonathan Scott Duff [mailto:[EMAIL PROTECTED] 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(