develooper Front page | perl.perl6.language | Postings from April 2005

Re: -X's auto-(un)quoting?

Thread Previous | Thread Next
From:
Nathan Wiger
Date:
April 25, 2005 14:17
Subject:
Re: -X's auto-(un)quoting?
Message ID:
426D5E63.2000108@sun.com
Juerd wrote:
> Nathan Wiger skribis 2005-04-25 13:35 (-0700):
> 
>>My point is simply that we pick one or the other, instead of
>>both/aliases/etc.
> 
> 
> But TIMTOWTDI. One way may be great for writing maintainable code, while
> the other is useful in oneliners (including single line method
> definitions).

Then I suggest "use English" for Perl 6 too. I think you'll find that, 
like Perl 5, people always use the short forms.

Has ANYONE on this list ever done something like this?

    use English;
    if ($OSNAME =~ /MSWin32/) {
        $OUTPUT_AUTOFLUSH++;
        local $WARNING = 0;
        print "Windoze\n" or die "Can't print: $OS_ERROR";
    }

I'd bet everyone would write that as:

    if ($^O =~ /MSWin32/) {
        $|++;
        local $^W = 0;
        print "Windoze\n" or die "Can't print: $!";
    }

Crap, I had to open the Camel just to find the long names. :-)

-Nate

P.S. I know this is the first time I've spoken up on Perl 6
      in 5-ish years, so nice to "see" you all once again

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About