Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^2: C-style for loop

by wol (Hermit)
on Nov 17, 2008 at 17:06 UTC ( #724085=note: print w/replies, xml ) Need Help??


in reply to Re: C-style for loop
in thread C-style for loop

Indeed. C style loops can't be that bad - otherwise they wouldn't be part of the language, would they? :-)

Certainly, C style loops are great if you're a good C programmer, and a novice Perl programmer: intuitive, predictable, easy.

And I guess that described quite a lot of us here at some point in our lives?

--
.sig : File not found.

Replies are listed 'Best First'.
Re^3: C-style for loop
by GrandFather (Sage) on Nov 17, 2008 at 20:13 UTC

    So everything that is part of Perl is undiluted goodness? How about the two parameter open or the .. operator that is two completely different an unrelated operators depending on context (where the context can be very subtle at times)?

    Perl's for loop is much closer to "intuitive" than C's for loops. Sure, C's for loops are comfortable for a C programmer, but that doesn't make them intuitive, predictable or easy compared with Perl's loops.

    Perl is a different language than C. Just because you can write C (or FORTRAN for that matter) in Perl doesn't mean you should. Embrace the Perly goodness and cast off the C baggage - use Perl for loops unless you really, really, really absolutely can't avoid using a C style loop.


    Perl reduces RSI - it saves typing

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://724085]
help
Chatterbox?
[1nickt]: I don;t think beliefs should be down-voted, just behaviours.
[james28909]: im not quite how to explain it any better nick. you evolved from ignorance to intelligence. not the other way. the universe evolves from gas coulds and debris into planets stars and galaxies ect. it doesnt happen any other way. hence it has ....
[james28909]: some kind of logic behind it
[james28909]: and that is also anothe rpoint i made, i think it has to do with perception of the world around you. most people think of evolution on a human scale. why could life evolve on this planet? because this planet evolved in this solar system. and so on.
[holli]: here's something for you to watch, James. I think you will like it
[erix]: for the record: I have not downvoted anyone on that subthread that was my fault
[james28909]: there are all kinds of things that had to happen to let life come to be. but at the same time, life may not be the end goal IF there is any kind of end goal lol
[james28909]: well who is the person who gets to decide which behaviour is worthy of a downvote? a person with their own beliefs? xD
[erix]: teleology -- I've never understood why that was thunk up
[erix]: ( and when teleology was brought up, during my biology-study., I couldn't get an answer either )

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (18)
As of 2017-12-15 14:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (433 votes). Check out past polls.

    Notices?