Rant after trying Rust a bit
Alex Parrill via Digitalmars-d
digitalmars-d at puremagic.com
Wed Jul 22 12:52:32 PDT 2015
I'm not at all familiar with Rust, so forgive me if I'm
misinterpreting something.
On Wednesday, 22 July 2015 at 18:47:33 UTC, simendsjo wrote:
> Cargo
> -----
> Rust has a default package manager much like Dub. The main
> difference is that Cargo has been endorsed by the Rust team and
> is an official product.
I think I read that this may happen soon.
> Traits
> ------
> ...
You can make a `conformsToSomeInterface!T` template, and use
`static assert`. D ranges, and the upcoming std.allocator,
already use this sort of 'interfaces without polymorphism'.
Ex. `static assert(isInputRange!(MyCoolRange));`
> Macros
> ------
> ...
Most of what macros in C were used for are now done with
templates, static if, etc. (I don't know how Rust's macros work).
Tools could theoretically execute `mixin`, but it effectively
requires a D interpreter. A library to do that would be really
nice.
> Borrowing
> ---------
> ...
Look into `std.typecons.Unique`, though I've seen people posting
that they don't like it (I haven't used it much; I had one use
case for it, which was sending it through `std.concurrency.send`,
but it doesn't work with that function).
Yes, D's community is pretty small. It's not something you can
just code; you have to market the language. And it's the
community that creates the many tools and packages.
More information about the Digitalmars-d
mailing list