News for hackers. Stuff that matters.
Re:Metaprogramming is less fun in D by charles-salvia on Friday April 21, 2017 @03:25PM (#14168571)
While I kind of like D, it's hard to really make the case for using it. The thing is, it simply doesn't provide that much of a significant advantage over modern C++14/17 to make it worthwhile. At least Rust introduces an entirely innovative new concept with the borrow checker. D is just basically C++ with optional garbage collection and better syntax for meta programming, but without the vast Universe of existing C++ libraries to leverage.
Re:Metaprogramming is less fun in D by Ace17 on Saturday April 22, 2017 @01:34AM (#14171244)
> D is just basically C++ with optional garbage collection and better syntax for meta programming, but without the vast Universe of existing C++ libraries to leverage.

Phobos, the D standard library, makes C++ standard library look very small. C++14 standard library still can't do "ls", "execvp", "socket" in a portable way (but we finally got std::thread and std::function!). Phobos can do all of this, and also haves support for md5, gzip, diff, sort, getopt, json, xml, ...

Thus the need for an external library is a lot less likely than it is in C or C++, and you almost never spend time rewrapping native stuff: it's already done by Phobos.

And in the end, if you need to use some specialized library, D can call C and C++ functions with zero overhead (I have D projects that use CGAL and SDL).

Re:Metaprogramming is less fun in D by mhh__ on Friday April 21, 2017 @03:43PM (#14168771)
D compile times alone are an advantage. I should probably point out that D can actually do some (More than anyone else) C++ interop.
Re:Metaprogramming is less fun in D by destructionator on Friday April 21, 2017 @05:06PM (#14169426)
D also has nice opt-in reflection as an advantage over C++ (though there are C++ tools to make up for it, to an extent).

The reflection is IMO the killer individual feature (well, hand-in-hand with the codegen to actually use it). The rest is just the benefit of 1000 small things that all add up to a greater whole.

Re:Metaprogramming is less fun in D by charles-salvia on Friday April 21, 2017 @07:51PM (#14170330)
Yeah, automatic static reflection for serialization of standard-layout structs in C++ would certainly be nice. You can achieve something like that with std::tuple, but it's certainly not comparable to first-class serialization.

PS, I used to enjoy your posts on SDN, before the site owner threw a fit. :-)