On Sat, Sep 30, 2000 at 10:34:40PM +0200, Bart Lateur wrote:
> On 30 Sep 2000 20:13:55 -0000, Perl6 RFC Librarian wrote:
> 
> >But setting $[ = 1 is the mathematically correct method for
> >array addressing and makes it easier for ordinary mortals to do
> >basic tasks with C<substr()>, array addressing and the like.

I agree. Make easy things easy, and hard things possible.

> I sure don't want the fact that a scripter decides to change $[, make
> used modules fail, because the module's author didn't anticipate that.

Similarly modules' formatting breaks if you set $/;
How many of the punctuation variables would be better with less-than-global
scope?

> Does this not imply that $[ should become lexically scoped?

Or the function of $[ becomes per-array.
(What would be the syntax to read and set it? pos @array?
it seems to be syntactically legal but undef both as rval and lval)

If it's lexically scoped, would it be for arrays declared in that scope, or
for arrays accessed in that scope?
I'm not sure. I think I see potential breakage both ways.

Nicholas Clark

Reply via email to