Bartosz Milewski seems to like D more than C++ now :)

bearophile bearophileHUGS at lycos.com
Thu Sep 19 19:24:16 PDT 2013


Szymon Gatner:

> http://bartoszmilewski.com/2013/09/19/edward-chands/

 From the blog post:

>Imperative languages offer no protection against data races — 
>maybe with the exception of D.<

What about Ada and Rust?


>Ask any C++ guru and they will tell you: avoid mutation, avoid 
>side effects, don’t use loops, avoid class hierarchies and 
>inheritance.<

At Going Native 2013 there was a very good talk that among other 
things suggests to avoid raw loops in C++ code. But while this is 
good advice (so much that raw loops are becoming a bit of code 
smell for me), there are several situations where imperative 
loops keep being better for me. Explicit recursion is not always 
more readable and more easy to understand than imperative foreach 
loops.

While most functions could and should be strongly pure, I often 
like mutation and imperative code inside functions. Haskell is a 
purely functional language, but I prefer a mix, like D, Scala, 
F#, etc. So I have to say that perhaps "D is the best functional 
language"[1].

Bye,
bearophile

[1] that is as much false as saying that "Haskell is the best 
imperative language" as some haskellers sometimes say :-)


More information about the Digitalmars-d mailing list