in reply to Re: Re: about Coolness, Impatience and Complexity
in thread about Coolness, Impatience and Complexity
For example, given hypothetical:
(and include method 3, which would be the functional/Haskill approach to this problem, which I know you can write, but I have no idea how to write it myself :-).my @d = 2 * all( @values ); # Method 1, assume 'use Q::S' my @d = map { 2*$_ } @values; # Method 2
Method 2 is the fastest of all these, but to those not versed in perl, it may be harder to describe than method 1, which 'reads' like what it's supposed to do. Depending on the situation I was in when coding this, I might purposely using the Q::S method if only to convey meaning moreso than method 2; that situation would most likely be limited to scientific groups with understanding of computing but no strong computer language skills. On the other hand, if I was with a web site design shop, I'd automatcially advocate the use of method 2, which is straight forward from (what we hope to expect) the viewpoint of experienced computer programmers.
|
---|