9 ms·
I don't think that's particularly surprising, and in fact that's the other half of the point: a 2K 'beginner program' in haskell or lisp could do all the work o
by a1369209993 9y ago
I don't think that's particularly surprising, and in fact that's the other half of the point: a 2K 'beginner program' in haskell or lisp could do all the work of a 50K C or java program, but because it's so much smaller, you have/need much less support structures and, yes, much fewer total defects.
- lmm 9y agoMy intuition is that code with 2kloc "worth" of language constructs would have the same defect rate across languages (and you can get a lot more done in n constructs in some languages than others), but that code using shorter identifiers or symbolic operators should have the same defect rate per "construct" i.e. a higher defect rate per line. But AIUI the evidence doesn't bear this out, and the per-line defect rate in APL or Perl is the same as in other languages.
- Joeri 9y agoAs programmers we like our lines to have a given level of cognitive load, depending on personal taste, so regardless of the language you’ll end up with on average the same number of language constructs per line. In high level languages those constructs do more than in lower level languages, but since they are already debugged the defect rate per construct is not higher, ergo the defect rate per line is also stable across languages.
- lmm 9y ago> regardless of the language you’ll end up with on average the same number of language constructs per line I'm saying this isn't true. APL is the extreme example, but languages vary quite a lot in how many constructs you can and do cram onto a single line.