On Friday, 9 August 2013 at 18:16:57 UTC, Ruslan Mullakhmetov
wrote:
On Tuesday, 6 August 2013 at 16:32:43 UTC, Nick Treleaven wrote:
On 06/08/2013 06:26, Elvis wrote:
Owned pointer in Rust is a good design IMO, how about D
equivalent?
I think this is about the closest ATM:
http://dlang.org/phobos/std_typecons.html#.Unique
would be good to have it as language feature like scoped
reference. this clear code (as from c++11 experience abundant
std::unique_ptr<T> get me irritated). And of course unique
idiom (ownership) get D usable for realtime (removed GC)
While I'm convinced that unique pointers / types are a important
concept, especially if combined with immutable. (What's
transitive unique/immutable can be cast to immutable .. ), I
don't think that just adding a new type modifier will lead D
anywhere.