<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Pragmatically, I would love this. I've run into use cases before where a sequence of ASCII characters would have sufficed, and the additional complexity of the Unicode model is unnecessary and undesired.<div class=""><br class=""></div><div class="">On a philosophical level, I think there's a discussion to be had as to whether the language/stdlib is the right place to delineate subsets of Unicode for programmer use, and whether or not having ASCIIString will encourage lazy programmers to avoid Unicode support altogether and/or 'misuse' this type as a means of storing raw bytes.&nbsp;</div><div class=""><br class=""></div><div class="">Personally, I'm +1 but I think we should carefully consider the ramifications.</div><div class=""><br class=""></div><div class="">Best,</div><div class="">Austin</div><div class=""><br class=""><div class=""><div class=""><div><blockquote type="cite" class=""><div class="">On Dec 13, 2015, at 1:47 PM, Jacob Bandes-Storch via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">StaticString provides an "isASCII" boolean property, but manipulating strings still requires the use of UnicodeScalarView / CharacterView, even if the strings are statically known to be ASCII-only.<div class=""><br class=""></div><div class="">I think it would be nice to have an ASCIIString in the standard library, similar to StaticString but with the following improvements:</div><div class=""><br class=""></div><div class="">- ASCIIString itself would be MutableCollectionType, with Index == Int for easy access.</div><div class=""><br class=""></div><div class="">- Its Generator.Element would be something which works with simple + and - operators (either UInt8, or perhaps a repurposed UnicodeScalar, or a new ASCIIScalar).</div><div class=""><br class=""></div><div class="">- The ability to create new ASCIIStrings at runtime, by appending/removing bytes, or by concatenating other ASCIIStrings.</div><div class=""><br class=""></div><div class="">Would anyone else find this useful?</div><div class=""><div class=""><br clear="all" class=""><div class=""><div class="gmail_signature"><div dir="ltr" class=""><div class="">Jacob Bandes-Storch<br class=""></div></div></div></div>
</div></div></div>
<img src="https://u2002410.ct.sendgrid.net/wf/open?upn=7XtDdMHRjqIUi4tzSjSp2pWQIyxYdP6woIWn4vwV5gf2jHgIMiXIL-2BiD9-2Bxtem8DTv-2FZAN3G3rcimCBlwDWmUhd28NAiMt0K4YPNwT2VxaIpPPtYphn1CfBhlMhCgjVPp554bPJZoKoK3rlS2omzbxdNo5h9m9L4c5Wf0Jj-2BXONDWmoEsKYdubNRiZ5SJ8jr0DkShAf8ZNjd0TJW4dMiS7yTFMzjB3px84ebVm070Yg-3D" alt="" width="1" height="1" border="0" style="height:1px !important;width:1px !important;border-width:0 !important;margin-top:0 !important;margin-bottom:0 !important;margin-right:0 !important;margin-left:0 !important;padding-top:0 !important;padding-bottom:0 !important;padding-right:0 !important;padding-left:0 !important;" class="">
_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-evolution<br class=""></div></blockquote></div><br class=""></div></div></div></body></html>