A Java programmer working in Perl was having a hard time debugging a for loop
for ($i=0,$t_inner=$t_pos;$i<$t_inner;$i++,$t_inner++){
$sub_date[$t_innner] = $date[$i + $t_sub];
$sub_list[$t_inner] = $date[$t_sub];
}
What struck me (besides his lack of use strict and the t_innner != t_inner typo) was how hard it is to read such code from someone who is used to manipulating arrays the hard way.
Surprising? (Score:2)
Really you (or whoever is the programmer) shouldn't try and do so much in the for (...) bit. If you're going to use the C-style for loop you really should try and limit yourself to the three simple steps: define variable, test variable, increment variable. Anything beyond that is pure obfuscation.
Re:Surprising? (Score:1)
Maybe he's memorized some favorite algorithm.