Larry Wall creates Sish28:
> On Sat, Mar 26, 2005 at 02:11:29PM +0800, Autrijus Tang wrote:
> : On Fri, Mar 25, 2005 at 10:03:45PM -0800, Larry Wall wrote:
> : > Hmm, well, if it got that far.  Given strict being on by default,
> : > this particular example should probably just die on the fact that $"
> : > isn't declared, since there's no $" in Perl 6.
> : 
> : Is $" okay as a variable name?  Is everything from perlvar.pod legal? :)
> 
> Considering nobody's written perlvar.pod for Perl 6 yet, yeah, everything
> in that pod is legal.  :-)
> 
> :     my $" = 3;
> : 
> : Pugs parses that because it only considers $! and $/ as legal
> : symbolic variable names.
> 
> $! will be a legal variable name.  $/ is going away, 

By which you mean that $/ is turning into a special $0.

> Anything that varied with the selected output filehandle like $|
> is now a method on that filehande, and the variables don't exist.
> (The p5-to-p6 translator will probably end up depending on some
> $Perl5ish::selected_output_filehandle variable to emulate Perl 5's
> single-arg select().)

I think $| et al. could just translate to methods on $*OUT, and select
would look like this:

    sub perl5_select($fh) {
        $*OUT = $fh;
    }

Is there some subtlety that that doesn't cover?

> %+ and %- are gone.  $0, $1, $2,  etc. are all objects that know
> where they .start and .end.  (Mind you, those methods return magical
> positions that are Unicode level independent.)

Uh, it might be a bad idea to make $# objects.  It might not, but it
might.  I think it would be fine if they turned into regular strings
upon assignment (and to pass their full objecthood around, you'd have to
backwhack them).  But the problem with keeping them objects is that if
you put them somewhere else and change them, they turn back into regular
strings without .start and .end, which may be a hard-to-track-down bug
if you're thinking that they stay objects... haven't really thought
about this much (and my head is irritatingly foggy at the moment).

> $; is gone because the multidim hash hack is gone.

Funny, I never used the multidim hash hack, I just emulated it:

    $hash{"$foo$;$bar"} = $value;

> We never did find a use for $}, thank goodness.

Isn't that the "enable all of Damian's unpublished modules" variable?

> $^W is is too blunt an instrument even in Perl 5, so it's probably gone.

Well, almost.  When writing a recent module, I found that one of the
modules I was using was spitting out an error from its own internal code
on one of my calls, and there was nothing wrong with the call.  I
submitted a bug report to the author, and searched for a way to shut it
up so my users wouldn't complain at me.  It ended up having to use $^W
at compile time (and it looks very hackish).  We ought to have a
(perhaps not quite as hackish) ability to say "there's no reason for
that warning, but I can't modify your code, so just be quiet".

> I'm not quite sure what to do with $^N or $^R yet.  Most likely they
> end up as something $<foo>ish, if they stay.

For $^N, how about $/[-1]?

Luke

Reply via email to