[EMAIL PROTECTED] wrote:
Shouldn't access to 'is computed' arrays be read-only?
If you want to be able to consume the elements by shifting,
you can always create a tied object that kees a cursor and
a reference to the underlying array and gives you that
access (and it could die for splicing
On Thursday, January 30, 2003, at 10:44 PM, Leopold Toetsch wrote:
Michael Lazzaro wrote:
[EMAIL PROTECTED] wrote:
Shouldn't access to 'is computed' arrays be read-only?
In general, I would hope that 90% of them would be, but it's been
stated that it won't be a requirement.
If you want
--- Michael Lazzaro [EMAIL PROTECTED] wrote:
So, is it obvious that I'm a little discouraged lately? Don't
suppose anyone can come up with some numbingly inspirational
words to cheer us (well, me) up...
Go us.
For Cis computed arrays, things get more complicated. Since there
are no true 'holes' in a primitive-typed array, the correct behavior
there would seem to be to autofill the array using the computed values.
For example, an empty array:
my int @a is computed { $^index ** 2 }
@a[2
Shouldn't access to 'is computed' arrays be read-only?
If you want to be able to consume the elements by shifting,
you can always create a tied object that kees a cursor and
a reference to the underlying array and gives you that
access (and it could die for splicing, etc.)...
Regards
(Sorry, deleted Michael's original message, hence this messy quoting
interaction)
On Thu, Jan 30, 2003 at 03:11:34PM -0500, [EMAIL PROTECTED] wrote:
Shouldn't access to 'is computed' arrays be read-only?
If you want to be able to consume the elements by shifting,
you can always create a tied
[EMAIL PROTECTED] wrote:
Shouldn't access to 'is computed' arrays be read-only?
In general, I would hope that 90% of them would be, but it's been
stated that it won't be a requirement. But hey -- note that, for
starters, this would mean that you could easily use an array for
caching
Michael Lazzaro wrote:
[EMAIL PROTECTED] wrote:
Shouldn't access to 'is computed' arrays be read-only?
In general, I would hope that 90% of them would be, but it's been stated
that it won't be a requirement.
If you want such 'is computed' thingy, then tie it or wrap it in your
own