[Issue 5889] Struct literal/construction should be rvalue

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Jun 29 18:16:01 PDT 2011


http://d.puremagic.com/issues/show_bug.cgi?id=5889



--- Comment #6 from Kenji Hara <k.hara.pg at gmail.com> 2011-06-29 18:11:03 PDT ---
(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 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