Subj : Re: curve for verbosity in a language To : comp.programming From : Jon Harrop Date : Sat Aug 06 2005 07:43 pm pantagruel wrote: > I don't think that LOC is verbosity, LOC is certainly not an ideal measure. It is just the best I have come up with (and it is still highly subjective). > however your suggestion is close, how about: > > if the character count between two programs doing the same task differ > then the program with the greater character count is verbose in > comparison to the first with each character being a point of verbosity. > I think this should include a normalization of whitespace. I have a couple of problems with that. Firstly, in some languages you must put in more whitespace (e.g. "=!" and "= !" are not the same in OCaml, and you must write "list >" in C++) and in some languages characters are often put in by convention (e.g. "f (a+b)" rather than "f(a+b)" in OCaml). Secondly, it fails to take into account the importance of seeing a lot of information on the screen at once. Also, OCaml code is easier to navigate than C++ code simply because it has more characteristic shapes. In particular, programs written in C-like languages are mostly unnecessary braces and loops that add nothing to the syntax. > Performance differences in the task between the programs affect the > verbosity, the question then is how is a difference in performance > calculated into program verbosity. Yes. That is why I plotted LOC vs speed graphs for four different versions of my ray tracer. > At that point one could begin to make reasonable statements such as > language x has been shown to be verbose in comparison to language y for > problems of type z. Have you read the conclusions on the page about my ray tracer? -- Dr Jon D Harrop, Flying Frog Consultancy http://www.ffconsultancy.com .