in reply to Re^7: Thread on Joel on software forum : "I hate Perl programmers."
in thread Thread on Joel on software forum : "I hate Perl programmers."
When I see a Swartzian Transform, I think, "Ah! he's sorting the data".Yeah, but it might take a few brainbeats to notice you're looking at an ST. The sort is bookended between two maps, but not any map/sort/map pipeline is an ST.
If I see:
it's immediately clear data is sorted. Regardless of how complex the expression is,@a = sort {COMPLEX EXPRESSION <=> COMPLEX EXPRESSION} @b
takes more time to register that data is sorted, and just sorted.@a = map {$_->[0]} sort {$a->[1] <=> $b->[1]} map {[$_, COMPLEX EX +PRESSION]} @b
ST's feature is speed. Not readability.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^9: Thread on Joel on software forum : "I hate Perl programmers."
by BrowserUk (Patriarch) on Jun 17, 2005 at 13:04 UTC |