Re: [swift-users] raw buffer pointer load alignment

2017-11-08 Thread Johannes Weiß via swift-users
Hi Kelvin, > On 8 Nov 2017, at 5:40 pm, Kelvin Ma wrote: > > yikes there’s no less verbose way to do that? and if the type isn’t an > integer there’s no way to avoid the default initialization? Can this be done > with opaques or something? well, it's 5 lines for the generic case to rule all t

Re: [swift-users] raw buffer pointer load alignment

2017-11-08 Thread Kelvin Ma via swift-users
yikes there’s no less verbose way to do that? and if the type isn’t an integer there’s no way to avoid the default initialization? Can this be done with opaques or something? On Wed, Nov 8, 2017 at 7:04 PM, Johannes Weiß wrote: > Hi Kelvin, > > > On 8 Nov 2017, at 4:54 pm, Kelvin Ma via swift-us

Re: [swift-users] raw buffer pointer load alignment

2017-11-08 Thread Johannes Weiß via swift-users
Hi Kelvin, > On 8 Nov 2017, at 4:54 pm, Kelvin Ma via swift-users > wrote: > > According to the docs, the load(fromByteOffset:as:) method requires the > instance to be “properly aligned” Does that mean if I have raw data meant to > be interpreted as > > 0 1 2 3 4 5

[swift-users] raw buffer pointer load alignment

2017-11-08 Thread Kelvin Ma via swift-users
According to the docs , the load(fromByteOffset:as:) method requires the instance to be “properly aligned” Does that mean if I have raw data meant to be interpreted as 0 1 2 3 4 5 6 [

Re: [swift-users] Was the String contains(_:) method changed in Swift 4?

2017-11-08 Thread Geordie Jay via swift-users
Jens Alfke schrieb am Mi. 8. Nov. 2017 um 16:54: > > > On Nov 8, 2017, at 2:24 AM, Geordie Jay via swift-users < > swift-users@swift.org> wrote: > > Would you be able to clarify where the line is between “tricky” and “not > tricky” and if possible the reasoning behind making this distinction? > B

[swift-users] [Announcement] Swift Automatic Sign Key

2017-11-08 Thread Mishal Shah via swift-users
We are updating the Linux development snapshot signing key to 'Swift Automatic Signing Key #2', because 'Swift Automatic Signing Key #1' will expire on November 18th 2017. Starting November 9th, 2017 we will be publishing development snapshots with the new signing key. The new signing key is

Re: [swift-users] Was the String contains(_:) method changed in Swift 4?

2017-11-08 Thread Jens Alfke via swift-users
> On Nov 8, 2017, at 2:24 AM, Geordie Jay via swift-users > wrote: > > Would you be able to clarify where the line is between “tricky” and “not > tricky” and if possible the reasoning behind making this distinction? Because > as an outsider this seems to me like an unfortunate remnant of Obj

Re: [swift-users] Was the String contains(_:) method changed in Swift 4?

2017-11-08 Thread Geordie Jay via swift-users
Quinn "The Eskimo!" via swift-users schrieb am Mi. 8. Nov. 2017 um 09:56: > > On 8 Nov 2017, at 08:47, Martin R via swift-users > wrote: > > > but apparently only if Foundation is imported. > > Which isn’t a huge surprise when you consider how tricky string > containment is. As someone who has

Re: [swift-users] Was the String contains(_:) method changed in Swift 4?

2017-11-08 Thread Quinn "The Eskimo!" via swift-users
On 8 Nov 2017, at 09:28, Martin R wrote: > Unicode correct string comparison _is_ tricky … Indeed, apparently so tricky I can’t type my tests in properly )-: Share and Enjoy -- Quinn "The Eskimo!" Apple Developer Relations, Developer Technic

Re: [swift-users] Was the String contains(_:) method changed in Swift 4?

2017-11-08 Thread Martin R via swift-users
Unicode correct string comparison _is_ tricky, but `s.contains(s)` will always be true :) And `s.contains(ss)` with your example strings return false. Regards, Martin > Am 08.11.2017 um 09:56 schrieb Quinn The Eskimo! via swift-users > : > > > On 8 Nov 2017, at 08:47, Martin R via swift-user

Re: [swift-users] Was the String contains(_:) method changed in Swift 4?

2017-11-08 Thread Quinn "The Eskimo!" via swift-users
On 8 Nov 2017, at 08:47, Martin R via swift-users wrote: > but apparently only if Foundation is imported. Which isn’t a huge surprise when you consider how tricky string containment is. import Foundation // U+00DF LATIN SMALL LETTER SHARP S let s = "Friedrichstra\u{df}e" let ss = "strasse" i

Re: [swift-users] Was the String contains(_:) method changed in Swift 4?

2017-11-08 Thread Martin R via swift-users
String has also a func contains(_ other: T) -> Bool where T : StringProtocol method, but apparently only if Foundation is imported. > Am 08.11.2017 um 04:03 schrieb David Keck via swift-users > : > > I am looking at the latest version of the “App Development with Swift” iBook > on page 12