Blog post: What D got wrong
Neia Neutuladh
neia at ikeran.org
Wed Dec 19 01:45:09 UTC 2018
On Wed, 19 Dec 2018 01:04:24 +0000, Nathan S. wrote:
> On Saturday, 15 December 2018 at 19:53:06 UTC, Atila Neves wrote:
>> Not the case in Rust, not the case in how I write D. TBH it's not such
>> a big deal because something has to be typed, I just default to const
>> now anyway instead of auto. @safe and pure though...
>
> I'd be interested in seeing some of that Rust code. My impression from
> Clojure is that an all-immutable style requires leaning heavily on the
> garbage collector and as far as I know Rust has none.
It is greatly simplified by automatic memory management. Rust doesn't have
a GC, but it has a complex ownership system instead, and that's the basis
of its memory management. When that's insufficient, you use reference
counting.
Besides which, this is about defaults. In cases where your data is
actually mutable and it would be awkward to switch to a more Haskell-like
way of coding, you can still use that.
More information about the Digitalmars-d-announce
mailing list