User loginNavigation |
Metrics for Programmatic Complexity?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? By johnnyb at 2006-12-31 02:11 | LtU Forum | previous forum topic | next forum topic | other blogs | 9539 reads
|
Browse archives
Active forum topics |
Recent comments
32 weeks 6 days ago
33 weeks 3 hours ago
33 weeks 3 hours ago
1 year 3 weeks ago
1 year 7 weeks ago
1 year 8 weeks ago
1 year 8 weeks ago
1 year 11 weeks ago
1 year 16 weeks ago
1 year 16 weeks ago