My two cents

Arun Chandrasekaran aruncxy at gmail.com
Mon Oct 23 08:59:34 UTC 2017


On Wednesday, 18 October 2017 at 08:56:21 UTC, Satoshi wrote:
> [...]

The language for sure is huge and complicated and adding new 
features will only make it grow bigger. I'm not saying we 
shouldn't add any new features. It is important to have the right 
defaults to gain the critical mass for the momentum to reach the 
next level.

I've been playing with D and most of the times I look for the 
idiomatic way of doing things in D rather than bringing my 
Java/C++ baggage with it.

p0nce's d-idioms[1] is excellent, but is still not enough. We 
should have more like it (and better).

Without the libraries like Boost and Qt, and ideas from books 
like Effective C++ series, Modern C++ design, etc it was once 
impossible for "humans" to write maintainable code in C++03. 
C++11/14 improved it a bit.

D is brilliant in many ways:

1. has the best C++ interfacing

2. very easy to write and reason about

Found this gem when reading Phobos

```
import std.algorithm, std.range, std.stdio;

void main()
{
     enum size = 500;
     writef("P5\n%d %d %d\n", size, size, ubyte.max);

     iota(-1, 3, 2.0/size).map!(y =>
         iota(-1.5, 0.5, 2.0/size).map!(x =>
             cast(ubyte)(1+
                 recurrence!((a, n) => x + y*1i + a[n-1]^^2)(0+0i)
                 .take(ubyte.max)
                 .countUntil!(z => z.re^^2 + z.im^^2 > 4))
         )
     )
     .copy(stdout.lockingBinaryWriter);
}
```

Such code should be on the front page to "market"

3. human readable std lib (unlike libstdc++)
4. Some features are very well thought and well designed, but 
some are not
5. TMP for humans

The community lacks language theory expert (purist?). (Rust 
community has the maximum, if I'm correct).


More information about the Digitalmars-d mailing list