--
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 I<literal> is a piece of data.
>> A I<scalar> is a variable that holds a literal.
>>
>> A I<list> is a sequence of literals and scalars.
>> An I<array> 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.
-Erik
>
>-Erik
>
>>
>>Well, what if an "Rvalue-assign list" is simply decoupled from
>>a normal "data list." The confusion would end. The concepts
>>themselves are separate, so why shouldn't the names be? "data
>>lists" become "The One True List Type", and "Rvalue-assign lists"
>>become something like "Rvalue sequences" (or a catchier name).
>>Peace would reign on earth, or at least p6-lang and p6-doc.
>>
>>(I hope I'm not missing something obvious here, at any rate :)
>>
>>
>>Joseph F. Ryan
>>ryan.311@osu
>>
>>
>
>
>____________________________________________________________
>Get 25MB of email storage with Lycos Mail Plus!
>Sign up today -- http://www.mail.lycos.com/brandPage.shtml?pageId=plus
>
____________________________________________________________
Get 25MB of email storage with Lycos Mail Plus!
Sign up today -- http://www.mail.lycos.com/brandPage.shtml?pageId=plus