[Issue 5889] Struct literal/construction should be rvalue
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Jun 29 23:33:19 PDT 2011
http://d.puremagic.com/issues/show_bug.cgi?id=5889
--- Comment #7 from Don <clugdbug at yahoo.com.au> 2011-06-29 23:28:22 PDT ---
(In reply to comment #6)
> (In reply to comment #5)
> 'Literal is rvalue' is very important semantics for strict typed languages.
> A literal is not referenced from any other places, so it is _unique_ and
> _thread_local_. This is necessary for good resource management.
> (e.g. Unique!T, Scoped!T, etc.)
But that's true of immutable as well. In reality, any struct literal which
exists at run time is stored in the executable as if it were immutable (just as
for a string literal).
> But now, In D we cannot create rvalue struct object 'in place'.
> (Note: Returned rvalue from function might be moved, so it is not 'in place'.)
> It looks to me like a serious flaw.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list