[OT] Rust discussion about uniqueness/mutability
Enamex via Digitalmars-d
digitalmars-d at puremagic.com
Fri Jul 31 17:47:38 PDT 2015
On Wednesday, 14 May 2014 at 14:47:24 UTC, David Nadlinger wrote:
> It's not directly related to the discussion we are currently
> having, and to most of us regulars their debate will appear to
> be somewhat trivial, as the distinction is so explicit in D and
> we don't have automatic borrowing. But maybe a look at a
> similar situation (but with different terminology) will lead to
> some nice ideas, so I figured I'd post this here.
>
> Cheers,
> David
How is it explicit in D? Something to do with shared/const? But
the default-owned/borrow vs explicit unique-borrow (but `&mut`)
in Rust /are/ explicit, while in D anything passed to a function
is by default either a completely independent copy or a shallow
copy of a reference that needs mutex'ing or a const-qualified
view to be safe.
Asking, not arguing, 'cause I'm new to D and a bit confused. I
hope replying to old topics is okay...
More information about the Digitalmars-d
mailing list