On Monday, 1 June 2015 at 04:43:20 UTC, Andrei Alexandrescu wrote:
FYI I just created
https://issues.dlang.org/show_bug.cgi?id=14638 as one of
possibly several language enhancements to improve usability of
noncopyable types (most allocators are not copyable) and to
enhance performance of objects that define this(this). -- Andrei
What do "static use" and "dynamic use" mean here?
Also, object with destructors need to have more restrictions:
S {
~this();
}
void foo() {
S s;
if(condition)
bar(s);
// <- should we run the destructor here?
}
This can either be solved by making such cases non-eligible, or
by "remembering" whether an object was moved using a hidden
boolean variable. AFAIK the latter is incidentally the solution
Rust chose.