Could someone take a look at DIP PR 109?
Per Nordlöw
per.nordlow at gmail.com
Mon Apr 2 07:59:56 UTC 2018
On Wednesday, 28 March 2018 at 06:43:15 UTC, Shachar Shemesh
wrote:
> https://github.com/dlang/DIPs/pull/109
>
> I submitted it 12 days ago. So far, except for two thumbs up, I
> got no official reaction of any kind for it.
>
> I did get an unofficial list of suggestions from Andrei, which
> I have now incorporated into the DIP, but I was under the
> impression that I was supposed to either get rejects or a DIP
> number after a week. That has not happened so far.
>
> For those too lazy to click on the link, the DIP is about
> adding ability to hook the implicit move D does with structs in
> order to update references (internal and/or external).
>
> Shachar
Good idea!
I've experimented with run-time variants [1] of Rust-style
borrow-checking to detect range-invalidation in my containers but
they can't handle moves because they don't use reference-counted
storage. Having `opMove` will make it possible to forbid (via an
`assert`) ranges from being invalidated when their associated
container is about to moved so this is really a very good idea!
Alternatively the borrow-checking logic could be built into a
reference-counted storage wrapper without the need for the
potential use of `opMove` at the cost extra memory indirections.
[1]
https://github.com/nordlow/phobos-next/blob/f64b94761325b68a52c361ffe36c95fc77c582c7/src/open_hashmap_or_hashset.d#L1308
More information about the Digitalmars-d
mailing list