Are there any current metrics available for programmatic complexity? For example, there are computational complexity classes for different types of programs, and big-Oh notation for runtime complexity of different algorithms, but is there a measure of how hard it is to actually program a given task in a given system?

For example, let's say the task is converting a list of numbers representing miles into kilometers. In C++, the code would be something like

float *miles_to_kilometers(float[] mile_list, int length) { float *kilo_list = new float[length]; for(int i = 0; i < length; i++) { kilo_list[i] = mile_list[i] * 1.61; } return kilo_list;

In Perl, it would be something like:

sub miles_to_kilometers { my @result = map { $_ * 1.61 } @{$_[0]}; return \@result; }

My intuition would be that the Perl version would have a lower programmatic complexity because the loop is built-in rather than explicitly coded. Is there a metric available that evaluates such propositions?