Parallel Rogue-like benchmark
H. S. Teoh
hsteoh at quickfur.ath.cx
Fri Aug 23 09:48:54 PDT 2013
On Fri, Aug 23, 2013 at 03:48:38PM +0200, bearophile wrote:
> The author of the serial language comparison has now created a
> simple parallel comparison:
>
> http://togototo.wordpress.com/2013/08/23/benchmarks-round-two-parallel-go-rust-d-scala-and-nimrod/
[...]
> Also the author keeps changing the way he measures languages, and in
> the meantime he has added the line count metric too, so now the D
> version should be modified so code like this takes 2 lines instead
> of 12:
>
> struct Tile {
> int X = void;
> int Y = void;
> int T = void;
> }
>
> struct Room {
> int X = void;
> int Y = void;
> int W = void;
> int H = void;
> int N = void;
> }
[...]
Seriously, I don't understand what's with this obsession with line
count metrics. Here's a 2-line version of the above code:
struct Tile { int X = void; int Y = void; int T = void; }
struct Room { int X = void; int Y = void; int W = void; int H = void; int N = void; }
which, as you can tell, says *nothing* whatsoever about the
expressiveness of the language. I mean, how would you account for the
possibility that perhaps the D community adopted this 2-line style of
coding as the "preferred" D style? Since we adopted a style that uses up
more lines, why should the *language* be penalized for having a higher
line count, when the 2-line version is equally acceptable to the
compiler and has exactly the same semantics?
Or, put another way, suppose I rename "void" to "nada", and then call
the resulting language E, and I postulate that in E, the preferred
coding style in my 2-line format above. Does this then mean that E is
more expressive than D? Certainly not! But according to the line count
metric, it does.
Frankly, the fact that line counts are used at all has already
decremented the author's credibility for me.
T
--
English is useful because it is a mess. Since English is a mess, it maps well onto the problem space, which is also a mess, which we call reality. Similarly, Perl was designed to be a mess, though in the nicests of all possible ways. -- Larry Wall
More information about the Digitalmars-d
mailing list