Idiomatic is using the language in the accent of the language. The problem with this is that people unfamiliar with the idiom find it difficult to understand. Consider something like a Swartzian Transform, if you arent particularly familiar with the language just seeing it is going to make a lot of people boggle.
@sorted=map { $list[$_->[0]] } sort { $a->[1] <=> $b->[1] || $a->[0] <=> $b->[0] } map { [ $_ , func($list[$_]) ] } 0..$#list;
The above might make a lot of sense to you and me, but to some non perl programmer asked to tweak your code while you are on holidy its just gibberish.
Anyway, this is probably not the best example as the ST is a fairly standard tool in the toolbox but i think you get the idea. Just think of all those times youve managed to put some very complex logic on the lhs of a for modifier using only boolean and ternary operators.
In reply to Re^4: Thread on Joel on software forum : "I hate Perl programmers."
by demerphq
in thread Thread on Joel on software forum : "I hate Perl programmers."
by techcode
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |