On Sat, Nov 13, 2010 at 06:09:00PM +0100, Jonathan Worthington wrote:
> With packed arrays, however, I'm less clear what they mean. Since
> the point of a packed array is compact storage, there's no chance to
> actually have containers. Thus does assignment to a slot in a
> compact array ever make sense? There's not a container to look up
> and store things in.
> While I can happily convince myself that:
> @x[0] := 1; # works, just sticks 1 into the appropriate location
> @x[0] = 1; # dies, can't assign when there's no container
> Actually makes sense, I can also somewhat see users not liking it.
> So my questions are:
> 1) What semantics would users expect? Is it OK to say "no, you can't
> assign" in this case?
> 2) If proposing that both should work, what, roughly, would that
> look like at an implementation level?

I have already come up with exactly the same conclusion on my own.  +1

Also, given "my int $x", "$x := 5" should work, but not "$x = 5".


Attachment: signature.asc
Description: Digital signature

Reply via email to