On Sat, Jul 25, 2009 at 2:04 PM, Patrick R. Michaud<pmich...@pobox.com> wrote:
> On Thu, Jul 23, 2009 at 05:56:31PM +0200, TSa wrote:
>> Hmm, it seems to be the case that the binding is defined to be a
>> readonly binding to the variable. I consider this a bad thing.
>> We should have my $x = 1; foo($x++,$x,$x++); to call foo(1,2,2)
>> and not foo(1,3,2) or even foo(2,3,1). The capture creation for
>> the foo call should be strictly left to right and capturing the
>> value at that moment.
> ...except that captures don't capture values -- they form references.
So we get a call to foo with three identical references to $x, which
has the value "3", or "1"? That would be interesting. Or is capture
meant to be lazy, and any postincrement is only called the first time
foo dereferences that parameter? That would be very interesting! Which
I would fully support in a language whose code I never had to
maintain, but would not have to want to explain to anyone with a
/me thinks he should hang out on #perl6 but knows he won't any time soon.