[Issue 12308] Request pragma for very thin struct wrappers

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Mar 7 02:21:17 PST 2014


https://d.puremagic.com/issues/show_bug.cgi?id=12308


bearophile_hugs at eml.cc changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bearophile_hugs at eml.cc


--- Comment #1 from bearophile_hugs at eml.cc 2014-03-07 02:21:06 PST ---
Walter seems clearly against this idea:

---------------------

http://forum.dlang.org/post/lfbhc4$dc$1@digitalmars.com
Walter Bright:

Posted in reply to Adam D. Ruppe
On 3/6/2014 8:01 PM, Adam D. Ruppe wrote:
> BTW you know what would help this? A pragma we can attach to a struct which
> makes it a very thin value type.

I'd rather fix the compiler's codegen than add a pragma.

---------------------

http://forum.dlang.org/post/lfbg06$30kh$1@digitalmars.com

Walter Bright:
On 3/6/2014 10:12 PM, H. S. Teoh wrote:
> From what I understand, structs are *supposed* to be thin value types. I
> would say that if a struct is under a certain size (determined by the
> compiler), and doesn't have complicated semantics like dtors and stuff
> like that, then it should be treated like a POD (passed in registers,
> etc).

Yes, that's right.

---------------------

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list