Re: Arrays vs lists; A possible solution?
Erik Steven Harrison wrote: -- On Wed, 12 Feb 2003 18:29:29 Joseph F. Ryan wrote: As near as I can tell, the only problem with the nice flow of: A Iliteral is a piece of data. A Iscalar is a variable that holds a literal. A Ilist is a sequence of literals and scalars. An Iarray is a variable that holds a list. is the Rvalue-assign list, which takes the form of: ($r1, $r2, $r3) = (1, 2, 3); I don't see a problem here. The list on the right is still just value, unmodifiable. It is a list of rvalues. When you use a variable on the right hand side it is a rvalue. Similarly, a list of variables doesn't flatten to it's values - it is the list itself that it is immutable. It's individual members still retain asignibility in rvalue context. -Erik Ah, I'm a compete fool. I meant Lvalue, not Rvalue. If you could do a mental s:e/Rvalue/Lvalue on that last message, I would appreciate it. Joseph F. Ryan [EMAIL PROTECTED]
Re: Arrays vs lists; A possible solution?
Erik Steven Harrison wrote: -- On Wed, 12 Feb 2003 17:14:17 Erik Steven Harrison wrote: -- On Wed, 12 Feb 2003 18:29:29 Joseph F. Ryan wrote: As near as I can tell, the only problem with the nice flow of: A Iliteral is a piece of data. A Iscalar is a variable that holds a literal. A Ilist is a sequence of literals and scalars. An Iarray is a variable that holds a list. is the Rvalue-assign list, which takes the form of: ($r1, $r2, $r3) = (1, 2, 3); I don't see a problem here. The list on the right is still just value, unmodifiable. It is a list of rvalues. When you use a variable on the right hand side it is a rvalue. Similarly, a list of variables doesn't flatten to it's values - it is the list itself that it is immutable. It's individual members still retain asignibility in rvalue context. Okay, pardon me for replying to myself, but that was _really_ badly worded. An example foreach ($foo, $bar, $baz) { .zoomdingle; } The objects in the list retain full status qua objects even though they are in a list, which is why we can call methods on them. Similarly, the fact that a scalar variable acts as a value on the lefthand side and a rvalue on the right hand side is retained even though it is in a list. It is the list itself which is immutable. Python programmers will grasp this real fast - it's just a tuple. You're completely right. See my last message :-) Joseph F. Ryan [EMAIL PROTECTED]
Re: Arrays vs lists; A possible solution?
-- On Thu, 13 Feb 2003 16:03:41 Joseph F. Ryan wrote: Erik Steven Harrison wrote: -- On Wed, 12 Feb 2003 17:14:17 Erik Steven Harrison wrote: -- On Wed, 12 Feb 2003 18:29:29 Joseph F. Ryan wrote: As near as I can tell, the only problem with the nice flow of: A Iliteral is a piece of data. A Iscalar is a variable that holds a literal. A Ilist is a sequence of literals and scalars. An Iarray is a variable that holds a list. is the Rvalue-assign list, which takes the form of: ($r1, $r2, $r3) = (1, 2, 3); I don't see a problem here. The list on the right is still just value, unmodifiable. It is a list of rvalues. When you use a variable on the right hand side it is a rvalue. Similarly, a list of variables doesn't flatten to it's values - it is the list itself that it is immutable. It's individual members still retain asignibility in rvalue context. Okay, pardon me for replying to myself, but that was _really_ badly worded. An example foreach ($foo, $bar, $baz) { .zoomdingle; } The objects in the list retain full status qua objects even though they are in a list, which is why we can call methods on them. Similarly, the fact that a scalar variable acts as a value on the lefthand side and a rvalue on the right hand side is retained even though it is in a list. It is the list itself which is immutable. Python programmers will grasp this real fast - it's just a tuple. You're completely right. See my last message :-) I *am*? Mark it on your calender! -Erik Joseph F. Ryan [EMAIL PROTECTED] Get 25MB of email storage with Lycos Mail Plus! Sign up today -- http://www.mail.lycos.com/brandPage.shtml?pageId=plus