<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Aug 2, 2017, at 4:01 PM, Shyamal Chandra via swift-users &lt;<a href="mailto:swift-users@swift.org" class="">swift-users@swift.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="gmail_default" style="font-family:monospace,monospace;font-size:large">Hi,</div><div class="gmail_default" style="font-family:monospace,monospace;font-size:large"><br class=""></div><div class="gmail_default"><font face="monospace, monospace" size="4" class="">After reading the Ray Wenderlich website tutorial [1]</font><font face="monospace, monospace" size="4" class="">&nbsp;about Unsafe Swift,&nbsp;</font><span style="font-family:monospace,monospace;font-size:large" class="">I was checking out this file [3] inside&nbsp;swift/</span>stdlib<span style="font-family:monospace,monospace;font-size:large" class="">/public/core titled MemoryLayout.swift.&nbsp; However, I was confused about the @_transparent before the each data member inside the enum.&nbsp; Why is this enum with the data members allowed by the Swift 3 language?&nbsp; What does @_transparent allow you to do that you might not otherwise?&nbsp; Could someone explain because the documentation is still unclear [2]?</span></div></div></div></blockquote><div><br class=""></div></div><div>@_transparent is only meant for use by the standard library and overlays. However, I’d be happy to answer any questions you may have about this attribute or its implementation, however you’ll need to be more specific. Which parts of TransparentAttr.rst are unclear? Note that the document is somewhat outdated but still largely accurate (some of the individual problems listed at the end have since been fixed, but the overall issues remain).</div><div><br class=""></div><div>Slava</div><div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="gmail_default"><font face="monospace, monospace" size="4" class=""><br class=""></font></div><div class=""><div class="gmail-m_-3874684313578852605gmail_signature"><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class="">Thanks!</div><div class=""><br class=""></div><div class="">Best,</div><div class=""><br class=""></div><div class="">Shyamal Chandra</div><div class=""><a href="mailto:shyamalc@gmail.com" target="_blank" class="">shyamalc@gmail.com</a></div><div class=""><br class=""></div><div class=""><div class="gmail_default" style="font-family:monospace,monospace;font-size:large">Sources:</div><div class="gmail_default" style="font-family:monospace,monospace;font-size:large"><br class=""></div><div class="gmail_default" style="font-family:monospace,monospace;font-size:large"><font face="monospace, monospace" size="4" class="">[1] </font><a href="https://www.raywenderlich.com/148569/unsafe-swift" class="">https://www.raywenderlich.com/148569/unsafe-swift</a><br class=""></div></div><div class=""><div class="gmail_default" style="font-family:monospace,monospace;font-size:large">[2] <a href="https://github.com/apple/swift/blob/master/docs/TransparentAttr.rst" class="">https://github.com/apple/swift/blob/master/docs/TransparentAttr.rst</a></div><div class="gmail_default" style="font-family:monospace,monospace;font-size:large">[3] <a href="https://github.com/apple/swift/blob/master/stdlib/public/core/MemoryLayout.swift" class="">https://github.com/apple/swift/blob/master/stdlib/public/core/MemoryLayout.swift</a></div><br class=""></div></div></div></div></div></div></div></div>
</div>
_______________________________________________<br class="">swift-users mailing list<br class=""><a href="mailto:swift-users@swift.org" class="">swift-users@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-users<br class=""></div></blockquote></div><br class=""></body></html>