Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^3: In Need of Mentoring

by JavaFan (Canon)
on Jan 16, 2012 at 09:13 UTC ( #948094=note: print w/ replies, xml ) Need Help??


in reply to Re^2: In Need of Mentoring
in thread In Need of Mentoring

Consider the difference between a C-style for loop and iteration.
Yeah, what about it? Is one of them incorrect? I know C programs with for loops that are correct, are you implying iteration is incorrect?


Comment on Re^3: In Need of Mentoring
Re^4: In Need of Mentoring
by chromatic (Archbishop) on Jan 17, 2012 at 02:03 UTC
    I know C programs with for loops that are correct...

    Me too. I also know C programs with for loops that are incorrect. A C-style for loop can do everything an iterator can do, if you're willing to program it to do so. Why do languages support iteration natively instead of making everyone write structural code by hand (or by editor) every time?

    Is one of them incorrect?

    We both know better.


    Improve your skills with Modern Perl: the free book.

      If you're implying that I've suggested to never use "iterators", you cannot be further from the truth.

      But just because iterators exists, doesn't mean C-style loop are suddenly bad. Most people discover the world is more than black and white at the age of 4; but many programmers seem not have grasped the idea the world is filled with shades of gray, and even colours.

      BTW, I know Perl programs with iterators that are incorrect.

        ... but many programmers seem not have grasped the idea the world is filled with shades of gray, and even colours.

        Well certainly. Do feel free to apply that principle while reading my posts; I certainly write them with the expectation that you're capable of applying critical thought and appreciating nuance.

        BTW, I know Perl programs with iterators that are incorrect.

        As do I. I also know C programs which use strings correctly.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (7)
As of 2014-12-25 20:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (162 votes), past polls