Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^4: What training do YOU need?

by Aristotle (Chancellor)
on Oct 22, 2002 at 13:30 UTC ( [id://207067]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Re: What training do YOU need?
in thread What training do YOU need?

Having said that in the time ive been using perl I think ive needed the construct a mere handful of times.

To reinforce the point.. I've literally never used it. There was not a single instance I wasn't equally or better served with the other constructs.

And to be honest, considering the number of cases I advised people not to use for(;;) for whatever they were using it for, and the number of times I restructured loops in others' code to not use it, if it was to disappear from the language I wouldn't shed a tear. Actually, scratch that, I'd be cheering.

Makeshifts last the longest.

Replies are listed 'Best First'.
Re: Re^4: What training do YOU need?
by demerphq (Chancellor) on Oct 22, 2002 at 13:47 UTC
    ive needed the construct

    For the record I didn't mean for (;;) but rather the while () {} continue {} construct which once or twice ive found has come in useful. For instance

    while (<$fh>) { s/foo/bar/ and next; s/yada/yada/ and next; #lots more of the same } continue { print $_; }
    Which _can_ be written without the continue, but when the innerds get a bit complex the continue can result in simpler code. (Sorry, but I had to make it clear ive never written a perl script with for (;;) in it ;-)

    Actually, scratch that, I'd be cheering.

    No disagreement there... It was that construct that seriously put me off of C when I first encountered it. In fact I still haven't quite got over the trauma of having to use it. :-)

    Now, the question is will Perl 6 have the obscene construct in it? My guess is probably... *sigh*

    --- demerphq
    my friends call me, usually because I'm late....

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2024-04-19 01:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found