Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^3: Why is the null while-loop condition expression true?

by Anonymous Monk
on Mar 28, 2016 at 22:45 UTC ( [id://1158984]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Why is the null while-loop condition expression true?
in thread Why is the null while-loop condition expression true?

The source code from v1 seems to make it pretty clear it was deliberate, never a bug. I am with AnomalousMonk. While while(){} is an odd synonym at first blush for while(1){} the idea of ever writing while(){} to mean… all the enclosed code is just for laughs because I never want it to run is even sillier.

Replies are listed 'Best First'.
Re^4: Why is the null while-loop condition expression true?
by BrowserUk (Patriarch) on Mar 28, 2016 at 22:51 UTC
    the idea of ever writing while(){} to mean… all the enclosed code is just for laughs because I never want it to run is even sillier.

    Hm. That would mean if( 0 ) & while( 0 ) were silly also, yet the Perl sources, amongst many others, are littered with innumerable examples of both.

    Countering a conclusion, because it happens to have been drawn by me, is the very definition of "silly".

    In every other case empty parens () mean false; to deem while() to mean the opposite, is...; well, it starts with s and is somewhat stronger than "silly".


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority". I knew I was on the right track :)
    In the absence of evidence, opinion is indistinguishable from prejudice.
      it starts with s and is somewhat stronger than "silly".
      … "sinconsistent"? Ah, no, "sinful" :-)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (1)
As of 2024-04-25 19:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found