in reply to Re^9: Thread on Joel on software forum : "I hate Perl programmers."
in thread Thread on Joel on software forum : "I hate Perl programmers."
FWIW, coming in such a long time after the party:
It has become my “standard conversion” for where I want to type
Of course, in this particular case, the correct, optimal solution is trivial:
my @grid = ( '01' .. '12' ) x 12;
In the more general case, I prefer another way, because it maintains symmetry:
my @grid = map @$_, ( [ '01' .. '12' ] ) x 12;
And to this:
Beyond the thinko, the problem I have with the for/push method is that the main objective – that of initialising the array @grid – gets lost in the noise of the construction.
I say bingo. That’s the reason I use Perl to begin with, rather than C. (“If I had a nickel for every time I wrote for( i = 0; i < LEN ; ++i ), …”)
Makeshifts last the longest.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^11: Thread on Joel on software forum : "I hate Perl programmers."
by BrowserUk (Patriarch) on Nov 30, 2005 at 17:53 UTC | |
by Aristotle (Chancellor) on Nov 30, 2005 at 19:41 UTC |