OT: This Swift thing

Michael Torrie torriem at gmail.com
Tue Jun 3 21:47:42 EDT 2014


On 06/03/2014 03:01 PM, Chris Angelico wrote:
> On Wed, Jun 4, 2014 at 6:43 AM, Sturla Molden <sturla.molden at gmail.com> wrote:
>> A Python with static typing would have been far better, IMHO. It seems they
>> have created a Python-JavaScript bastard with random mix of features.
>> Unfortunately they retained the curly brackets from JS...
> 
> More important than the syntax is the semantics. Have they kept the
> embarrassment of UTF-16 strings? I skimmed the docs, and I *think*
> they've made it support Unicode. No idea how performance and memory
> usage are, but once you have the semantics right, you can worry about
> performance later.

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

In some ways Swift reminds me of Vala.  IE it's syntactic sugar around
existing class libraries that expose them as basic types.



More information about the Python-list mailing list