<div dir="ltr">I mean essentially what is known as a POD type (plain ol' data) in C++. A data payload without clever features. <div><br></div><div>In this instance, I don't <i>necessarily</i> care about whether it's a struct or class from a 10,000 foot level, so long as it can copy and is composed of only other value types. A struct constraint gets us half-way there, but only incidentally by virtue of value semantics.<div><br></div><div>In the Cocoa APIs, these are often defined as an NSDictionary with key-value pairs. You could subclass NSDictionary and mess with the consuming API... but it's pretty clear that the consuming API only wants data and doesn't want you to get clever about it.</div></div><div><br></div><div>(Not to detract from the enum discussion, because I really like where that's headed re:Tony's email.)</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Oct 21, 2016 at 12:37 PM, Dave Abrahams via swift-evolution <span dir="ltr"><<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
on Fri Oct 21 2016, Mike Kasianowicz <<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>> wrote:<br>
<br>
> Hooray, I'm not the only one.<br>
><br>
> I agree copying is a much more nuanced issue- but sometimes struct is close<br>
> enough.<br>
><br>
> What I would really like is "this is a data-only type" rather than<br>
> "struct".<br>
<br>
</span>I'm not sure what you mean by “data-only,” but the constraint I want is<br>
“has value semantics.”<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
-Dave<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
______________________________<wbr>_________________<br>
swift-evolution mailing list<br>
<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a><br>
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank">https://lists.swift.org/<wbr>mailman/listinfo/swift-<wbr>evolution</a><br>
</div></div></blockquote></div><br></div>