Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Re^2: print every nth element of an array.

by sundialsvc4 (Abbot)
on Jun 06, 2013 at 03:51 UTC ( #1037356=note: print w/replies, xml ) Need Help??

in reply to Re: print every nth element of an array.
in thread print every nth element of an array.

Y’know, in this case, I think that what I’d do is “a C-style for-loop,” for exactly the reason mentioned:   because it is “certainly one that would be understood by almost anyone who has taken up programming, regardless of the language.”   Someone (anyone ...) could someday encounter that piece of code, fairly-quickly guess what it was long-ago intended to do, and be correct.   If they now were tasked with changing that piece of code, they could once again do so with confidence.   And that, to me, pretty much trumps every other consideration.   “Shrink-wrap it... ship it...”

  • Comment on Re^2: print every nth element of an array.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1037356]
and a soft breeze sighs...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (4)
As of 2017-08-19 11:25 GMT
Find Nodes?
    Voting Booth?
    Who is your favorite scientist and why?

    Results (310 votes). Check out past polls.