4 ms·
I'm obviously biased as I work for the D foundation, but I tried C# for a while - it's was fairly nice to use but the lack of const-correctness and purity where
by mhh__ 6y ago
I'm obviously biased as I work for the D foundation, but I tried C# for a while - it's was fairly nice to use but the lack of const-correctness and purity where I wanted it made me badly miss D.
D is not a simple language, but the solutions it chooses are usually very simple - for example, D has unit testing in the language, this is maybe a day's work in most compilers and yet not many others do it.
- WalterBright 6y agoBuilt in unit testing sounds like a dumb feature, but it really is transformative in how one writes code. It's so dang convenient to write unit tests, it's hard to justify not doing it. It's the same with the builtin documentation generator.
- mhh__ 6y agoA feature so useful, in fact, that some people write their unittests in D even if the other project is written in something else
- crazypython 6y ago> It's the same with the builtin documentation generator. The syntax of the documentation generator is also far more convenient than JSDoc or JavaDoc.
- WalterBright 6y agoThe documentation generator has recently acquired the ability to recognize Markdown, making it even easier. I was initially skeptical of Markdown, but after using it here and there became a fan.
- crazypython 6y agoMarkdown is like C and XML: Popular not because it's very easy to write a single-pass parser for, giving it widespread and universal use.
- ben-schaaf 6y agoWhere it really shines is with templates. I can write a unit test inside a templated class/struct and it gets instantiated along side it, so I know my tests pass for every template instance that I use.