On Mon, Sep 11, 2006 at 11:12:00AM -0700, Larry Wall wrote:
: On Mon, Sep 04, 2006 at 08:54:02PM +0200, TSa wrote:
: : But are assignment ops allowed as initializer?
: :
: : my $z = $p but= { .y = 17 };
:
: Why not? It's only the first = that's potentially special. (And it's
: only for non-my
On Mon, Sep 04, 2006 at 08:54:02PM +0200, TSa wrote:
: But are assignment ops allowed as initializer?
:
: my $z = $p but= { .y = 17 };
Why not? It's only the first = that's potentially special. (And it's
only for non-my, since my's = is an ordinary assignment at normal
run time.) I don't see
HaloO,
Trey Harris wrote:
I do not think that C should mutate its LHS, regardless what its
RHS is.
I strongly agree. We have the mutating version
$p but= { .y = 17 };
which is just one char longer and nicely blends as a meta operator.
But are assignment ops allowed as initializer?
my $z
In a message dated Fri, 1 Sep 2006, Juerd writes:
Trey Harris skribis 2006-09-01 0:17 (-0700):
I think these semantics are Almost Right, but yet Entirely Wrong. The
problem is that C reads to me as a *mutating* operator. That is, I
would expect the above code snippet to give me a C<$z.y> of
Trey Harris skribis 2006-09-01 0:17 (-0700):
> I think these semantics are Almost Right, but yet Entirely Wrong. The
> problem is that C reads to me as a *mutating* operator. That is, I
> would expect the above code snippet to give me a C<$z.y> of 17, but leave
> C<$p.y> as 0. Surely this is