On Sunday, 23 June 2013 at 15:30:16 UTC, Marco Leise wrote:
They have compiler support which removes the syntactical noise
of
templates and makes them behave more natural.
Indeed. I don't mind the syntax (actually, I prefer RefCounted!T
to ~T or whatever symbol rust uses) but there's some other things
their compiler does like forbid reassigning a refcounted thing if
you have a pointer to it still in scope that D can't do in the
library.
But the library types can do the bulk of it, and disabling
certain problematic parts of the struct helps keep it sane.
I wonder how many D programmers actually use Phobos' library
pointer types.
Ironically, I don't, but I do use similar recreations for certain
tasks.