<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="">There’s a RawByte struct in the Swift 2.2 standard library:</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 132, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">/// A byte-sized thing that isn't designed to interoperate with</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 132, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">/// any other types; it makes a decent parameter to</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 132, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">/// `UnsafeMutablePointer&lt;Memory&gt;` when you just want to do bytewise</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 132, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">/// pointer arithmetic.</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(209, 47, 27);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">@available</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">(*, deprecated, message=</span><span style="font-variant-ligatures: no-common-ligatures" class="">"it will be removed in Swift 3"</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">)</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(187, 44, 162);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">public</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> </span><span style="font-variant-ligatures: no-common-ligatures" class="">struct</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> RawByte {</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">}</span></div></div><div class=""><br class=""></div><div class="">Why is that deprecated? On the current Swift master branch (22c4d7d) it’s still used in the String-related code and there’s also no mention about it being deprecated. Is there a replacement for RawByte? Should I just write my own version when I don’t want Int8 or UInt8 to mean “just a byte”?</div><div class=""><br class=""></div><div class=""><div class="">Bonus question: Where does this deprecation come from? How can something be deprecated in the public Swift release when it’s not deprecated in the Swift source?</div></div><div class=""><br class=""></div><div class="">Cheers,</div><div class=""><br class=""></div><div class="">Marco</div></body></html>