Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Thoughts on Perl6 - Love it? Hate it?

by petral (Curate)
on Jan 10, 2002 at 23:49 UTC ( [id://137827]=note: print w/replies, xml ) Need Help??


in reply to Thoughts on Perl6 - Love it? Hate it?

I guess I have most of the same thoughts others have.   I worry that Larry and Damian might overreach and get some really basic thing muddled.   I don't want to have to do $filehandle.autoflush(1) instead of $|++.   And '_' instead of '.' for concat?!

But then I was reading exegesis 3 and came to Damian saying "in perl5 that would be...".   I had a momentary sensation like accidentally coming on some Fortran code or something and thinking: "Boy, I remember when we had to go through all that just to get something done".   So, now I've stopped worrying (and I'm getting impatient with perl5).

(Maybe currying will transform Perl in perl6 like references did in perl5.)

  p
  • Comment on Re: Thoughts on Perl6 - Love it? Hate it?

Replies are listed 'Best First'.
Re: Re: Thoughts on Perl6 - Love it? Hate it?
by Anonymous Monk on Jan 11, 2002 at 01:29 UTC
    I don't want to have to do $filehandle.autoflush(1) instead of $|++.

    Ugghhh! $++ doesn't do what you think. You think $| == 0 and that $|++ makes $|==1. Sure IFF $|==0. But what when some other fool does $|++. Then your $|++ doesn't do anything. Even worse $|-- doesns't set $|==0, because you blindly did $++. Now maybe your think this turns it into some sort of recursive lock type thing. No! because someone could have done $|=0 or $|=1 in another part or the code, cuz it's is the RightThing(tm).

    Just remember that $|++ is a SIN. Don't do it.

    BTW, what does $|==-1 even mean?

      $| is magic. It is always either 0 or 1. $|++ sets its value to 1 no matter what its original value was.

      However, $|-- is a bit trickier. $|-- toggles the value of $|. So, its actually a lot like $| = !$_

      % perl -le 'print $| and $|++ for 1..5;' 0 1 1 1 1 % perl -le 'print $| and $|-- for 1..5;' 0 1 0 1 0

      -Blake

      'perldoc perlvar'

      The only values that count here are 0 and non-zero.
        Consider the tao of $|--

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://137827]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (3)
As of 2024-04-18 23:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found