Re: [swift-users] Swift 4 "Cannot use mutating member on immutable value: 'self' is immutable"

2017-09-14 Thread Jon Shier via swift-users
Looks like this is sort of tracked in  SR-5515popFirst error message is silly . I’m not sure what a good answer is here, since it seems like it isn’t supposed to be available if it can’t guarantee O(1) behavior. Still seems like Array should have it

Re: [swift-users] Swift 4 "Cannot use mutating member on immutable value: 'self' is immutable"

2017-09-14 Thread Jon Shier via swift-users
This seems oddly similar to https://bugs.swift.org/browse/SR-5659, but [Thing] should meet the appropriate criteria for popFirst to work properly. Yet the error we’re seeing here is the same that was originally seen when trying to use popFirst on a String. Definitely feels like some sort

Re: [swift-users] Swift 4 "Cannot use mutating member on immutable value: 'self' is immutable"

2017-09-14 Thread Jon Shier via swift-users
It also doesn’t explain why removeFirst would work but popFirst doesn’t. The mutation to the underlying array should be the same, the only different is that one returns the element optionally. It also doesn’t explain why popFirst doesn’t show up I the autocomplete but compiles anyway.

Re: [swift-users] Swift 4 "Cannot use mutating member on immutable value: 'self' is immutable"

2017-09-14 Thread Vladimir.S via swift-users
On 14.09.2017 11:14, Quinn "The Eskimo!" via swift-users wrote: On 14 Sep 2017, at 03:56, somu subscribe via swift-users wrote: popFirst is not available in the Array … Right. This makes sense when you consider the standard setup for an array, namely, a variable length buffer of items.

Re: [swift-users] noob question about modules

2017-09-14 Thread blaster_in_black via swift-users
Thanks much, Alex. But how do you physically partition the namespace within a module, if not by sub-folders? I am not sure whether the following example is, by definition, of a submodule that one could import by writing "import Cacao.StyleKit": Https://github.com/PureSwift/Cacao/tree/master/So

Re: [swift-users] Swift 4 "Cannot use mutating member on immutable value: 'self' is immutable"

2017-09-14 Thread Quinn "The Eskimo!" via swift-users
On 14 Sep 2017, at 03:56, somu subscribe via swift-users wrote: > popFirst is not available in the Array … Right. This makes sense when you consider the standard setup for an array, namely, a variable length buffer of items. Removing the first element is expensive, whereas removing the las