<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=""><div class="">Thank you for elaborating on your concerns! Some responses below.</div><br class=""><div><blockquote type="cite" class=""><div class="">On Mar 28, 2016, at 11:09, Антон Жилин &lt;<a href="mailto:antonyzhilin@gmail.com" class="">antonyzhilin@gmail.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">UnsafeBufferPointer is currently represented as a (nullable) C pointer plus size. It can be implemented almost in pure Swift (with calls to C functions).<div class=""><br class=""><div class="">After the proposal is accepted, it will be replaced with Optional&lt;UnsafeBufferPointer&gt;.</div></div></div></div></blockquote><div><br class=""></div><div>That is not the proposal; please re-read the&nbsp;<a href="https://github.com/apple/swift-evolution/blob/master/proposals/0055-optional-unsafe-pointers.md#unsafebufferpointer" class="">section on UnsafeBufferPointer.</a>&nbsp;(You might not be happy with this version either, though.)</div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class=""><div class="">But it will require a compiler-only "hack" for Optional not to require extra memory for nil (I assume, Optional will look into address part of UnsafeBufferPointer). This&nbsp;symbiosis will have to be built in the compiler, and I call that "compiler magic".</div></div></div></div></blockquote><div><br class=""></div><div>This is actually standard behavior for all enum types (guaranteed) and all struct types whose first property is such an enum or built-in type with available "extra inhabitants" (an optimization whose details may change in the future). This includes structs beginning with a non-optional AnyObject, and enum types you define like this:</div><div><br class=""></div><div>enum Maybe&lt;T&gt; {</div><div>&nbsp; case just(T)</div><div>&nbsp; case nothing</div><div>}</div><div><br class=""></div><div>If 'T' is a type that has a known invalid representation, such as AnyObject, that representation will be used for the 'nothing' case of 'Maybe&lt;T&gt;'</div><div><br class=""></div><div>Best,</div></div><div class="">Jordan</div></body></html>