Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^4: In Need of Mentoring

by chromatic (Archbishop)
on Jan 17, 2012 at 02:03 UTC ( #948242=note: print w/ replies, xml ) Need Help??


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

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.


Comment on Re^4: In Need of Mentoring
Re^5: In Need of Mentoring
by JavaFan (Canon) on Jan 17, 2012 at 09:10 UTC
    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://948242]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (7)
As of 2014-10-21 04:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (96 votes), past polls