Hi Larry,
# from Larry Wall
# on Thursday 11 September 2008 12:13:
So when you put something into a list context, some of the values
will be considered easy, and some will be considered hard.
The basic question is whether we treat those the same or differently
from a referential point of view.
Qui, 2008-09-11 às 12:13 -0700, Larry Wall escreveu:
And I guess the fundamental underlying constraint is that a list cannot
be considered immutable unless its feeds can be considered immutable,
at least in some kind of idempotent sense. This conflicts with the
whole point of reactive
* Larry Wall [EMAIL PROTECTED] [2008-09-11 21:20]:
As a first shot at that definition, I'll submit:
1 .. $n # easy
1 .. *# hard
On the other hand, I can argue that if the first expression is
easy, then the first $n elements of 1..* should also be
considered easy, and it's
the above produce 1\n2\n3\n4\n5\n or
1\n ?
My followup question is then:
my @a = 1,2,3,4,5;
my @b = 6,7,8;
for @a,@b { .say; @b = (); }
I have more examples involving various aspects of list and
iterator semantics, but the answers to the above will help guide
my questions.
Pm
of list and
: iterator semantics, but the answers to the above will help guide
: my questions.
At the moment the design of Perl 6 (unlike certain FP languages) is
that any dependence on the *degree* of laziness is erroneous, except
insofar as infinite lists must have *some* degree of laziness
HaloO,
Patrick R. Michaud wrote:
My question is whether the change to @a inside the for loop
affects the iterator created at the beginning of the for loop.
Since Larry said that single assignment semantics is the ideal
we should strive for, I would opt for the iterator being unaffected
by the
is then:
my @a = 1,2,3,4,5;
my @b = 6,7,8;
for @a,@b { .say; @b = (); }
I have more examples involving various aspects of list and
iterator semantics, but the answers to the above will help guide
my questions.
Pm
TSa Thomas.Sandlass-at-vts-systems.de |Perl 6| wrote:
Since Larry said that single assignment semantics is the ideal
we should strive for, I would opt for the iterator being unaffected
by the assignment to @a. When this happens the singly assigned
former content of @a is snaphot by the iterator.
Ter, 2008-09-09 às 10:10 -0500, Patrick R. Michaud escreveu:
I think my question can be best understood by example -- what
does the following produce?
my @a = 1,2,3,4,5;
for @a { .say; @a = (); }
The problem actually becomes more evident with
my @a = 1,2,3,4,5;
for @a { .say;