OT: This Swift thing

Chris Angelico rosuav at gmail.com
Tue Jun 3 22:21:18 EDT 2014


On Wed, Jun 4, 2014 at 11:47 AM, Michael Torrie <torriem at gmail.com> wrote:
> A Swift string is simply a one-to-one mapping of the NSString class.
> Apple claims it is "unicode compliant" whatever that means.
>
> https://developer.apple.com/library/prerelease/ios/documentation/Swift/Conceptual/Swift_Programming_Language/StringsAndCharacters.html

Yeah, I was looking at the same page. Note how, further down, a syntax
is given for non-BMP character entities (the same as Python's), and
then a bit more down the page, iteration over a string is defined,
with a non-BMP character in the example string. That's a good start.
However, keep going down... and you find that the length of a string
is calculated by iteration, which is a bad sign. I don't see anything
about indexing, which is the most important part.

ChrisA



More information about the Python-list mailing list