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 | 9778 reads
|
Browse archives
Active forum topics |
Recent comments
4 days 15 hours ago
4 days 15 hours ago
4 days 15 hours ago
3 weeks 5 days ago
4 weeks 3 days ago
4 weeks 3 days ago
4 weeks 5 days ago
4 weeks 5 days ago
4 weeks 5 days ago
5 weeks 1 day ago