Re: [swift-users] Is it possible to install Swift 4 on El Capitan with Xcode 8?

2017-09-04 Thread Fritz Anderson via swift-users
On 2-Sep-2017, at 5:04 AM, Mr Bee via swift-users wrote: > Since I'm still using my old mid-2009 Macbook Pro, which is still working > very well by the way, I'm stucked with macOS El Capitan (10.11.6) with Xcode > 8 and Swift 3. Hence, I also couldn't install Xcode 9 and Swift 4 because > they

Re: [swift-users] Assigning a variable to itself

2017-02-23 Thread Fritz Anderson via swift-users
I’ll leave it to others to explain whether this is the intended behavior, but the further I get from properties being idempotent, the more grief I’ve had. Especially when (as I assume is your real use case) I tried to assign something to itself to force a didSet {} during viewDidLoad(). If I m

Re: [swift-users] Assigning a variable to itself

2017-02-22 Thread Fritz Anderson via swift-users
I’ll leave it to others to explain whether this is the intended behavior, but the further I get from properties being idempotent, the more grief I’ve had. Especially when (as I assume is your real use case) I tried to assign something to itself to force a didSet {} during viewDidLoad(). If I m

[swift-users] hashValue of enum cases (was Reducing Array to OptionSet)

2016-11-04 Thread Fritz Anderson via swift-users
On 3 Nov 2016, at 8:37 PM, Erica Sadun via swift-users mailto:swift-users@swift.org>> wrote: > private enum StringEnum: String { case one, two, three } > public init(strings: [String]) { > var set = MyOptionSet() > strings.flatMap({ StringEnum(rawValue: $0) }) >

Re: [swift-users] Class Variable delayed stored

2016-10-04 Thread Fritz Anderson via swift-users
On 3 Oct 2016, at 5:46 PM, jason bronson via swift-users wrote: > > I have this class I wrote which stores the error messages from the > firebaseauth if a error occurs. > The problem is that the variable on first return is not set and on second > return is. > variable _errorMsg is empty on fir

Re: [swift-users] private vs. fileprivate on global declaration in Swift3?

2016-09-28 Thread Fritz Anderson via swift-users
On 28 Sep 2016, at 9:29 AM, Dave Reed via swift-users wrote: > > They aren't identical. Here's a good explanation: > > http://useyourloaf.com/blog/swift-3-access-controls/ > Useful, but the OP asks about “global” symbols, which the exampl

Re: [swift-users] New Swift Snapshots Available!

2016-08-26 Thread Fritz Anderson via swift-users
Are others finding that the necessary developer-installation signature is absent? I’m virtually certain that https://swift.org/builds/development/xcode/swift-DEVELOPMENT-SNAPSHOT-2016-08-25-a/swift-DEVELOPMENT-SNAPSHOT-2016-08-25-a-osx.pkg

[swift-users] Chaining struct-mutating funcs

2016-08-05 Thread Fritz Anderson via swift-users
Swift 3 as of Xcode 8.0b4 TL;DR: I have a struct value type backed by a copy-on-write mutable buffer. You use it to perform arithmetic on the buffers. The most expressive way to do this efficiently is to chain the arithmetic operators so each mutates the same buffer. Swift does not like to chai

[swift-users] Chaining struct-mutating funcs

2016-08-05 Thread Fritz Anderson via swift-users
Swift 3 as of Xcode 8.0b4 TL;DR: I have a struct value type backed by a copy-on-write mutable buffer. You use it to perform arithmetic on the buffers. The most expressive way to do this efficiently is to chain the arithmetic operators so each mutates the same buffer. Swift does not like to chai

Re: [swift-users] Collection underestimatedCount() does _?

2016-03-19 Thread Fritz Anderson via swift-users
On Mar 19, 2016, at 2:53 PM, Brent Royal-Gordon via swift-users wrote: >>> I might have missed something since a lot of the results are for tests >>> >>> But why would `underestimatedCount` ever be used instead of `c

Re: [swift-users] Collection underestimatedCount() does _?

2016-03-19 Thread Fritz Anderson via swift-users
On Mar 19, 2016, at 1:08 AM, Dmitri Gribenko via swift-users wrote: > > This API comes from Sequence, which does not have a count that you can > inspect without possibly consuming the sequence. Am I right that notionally-infinite sequences (like bytes from a random-number generator) should rep