Re: [swift-users] Type inference issue with map and filter chained

2017-10-03 Thread Vladimir.S via swift-users
On 03.10.2017 21:32, Will Stanton via swift-users wrote: Is this a REPL-only issue perhaps? The code below compiles `swift build` without error for me (pasted into Sources/main.swift, Ubuntu 17.04, Swift 4 release; haven’t tried in Xcode). A similar issue, but apparently not REPL-only:

Re: [swift-users] Netlib

2017-10-03 Thread Vladimir.S via swift-users
On 03.10.2017 19:02, Edward Connell via swift-users wrote: Hi All, Sorry something strange happened with the first post, so I am reposting this. I've recently wrapped up an ML framework research project that I've been working on for some time. It addresses a lot of difficult design problems,

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

2017-09-18 Thread Vladimir.S via swift-users
On 17.09.2017 13:25, Quinn "The Eskimo!" via swift-users wrote: On 15 Sep 2017, at 21:35, Vladimir.S via swift-users <swift-users@swift.org> wrote: … for me it is very strange decision to disallow a method because it is 'expensive'. That’s pretty normal for Swift

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

2017-09-15 Thread Vladimir.S via swift-users
t explain why popFirst doesn’t show up I the autocomplete but compiles anyway. Jon On Sep 14, 2017, at 8:16 AM, Vladimir.S via swift-users <swift-users@swift.org <mailto:swift-users@swift.org>> wrote: On 14.09.2017 11:14, Quinn "The Eskimo!" via swift-users wrote: On 1

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

Re: [swift-users] ⁨Is it possible to store a set of heterogeneous items with protocol?

2017-07-18 Thread Vladimir.S via swift-users
On 17.07.2017 4:51, Glen Huang via swift-users wrote: Thanks for the code sample and link, but if I’m not wrong, this pattern doesn’t allow heterogeneous items. Support the question. Trying to understand if we can have something like [AnyHashable] for our custom protocol(with associated type)

Re: [swift-users] UserDefaults with generic keys

2017-07-07 Thread Vladimir.S via swift-users
On 07.07.2017 14:02, Thierry Passeron via swift-users wrote: Hi Everyone, Using Swift 3.1, I was wondering if I could come up with something largely inspired by Notification.Name to help me deal with UserDefaults so I started by doing something like: The only kind of solution I was able to

Re: [swift-users] did i just imagine tuples were going to be hashable in swift 4?

2017-07-07 Thread Vladimir.S via swift-users
On 07.07.2017 5:50, David Baraff via swift-users wrote: I thought I read that tuples would finally be hashable in swift 4, allowing for them to be used in dictionaries/sets, but now that i google for it, i find no mention of it. are there any plans? so often i just want to quickly create a

Re: [swift-users] override-like keyword for default implementations

2017-05-16 Thread Vladimir.S via swift-users
On 16.05.2017 20:44, Charles Srstka via swift-users wrote: On May 16, 2017, at 12:32 PM, Nevin Brackett-Rozinsky via swift-users > wrote: There is not. At some point in the future, I believe the plan is to eventually allow default

Re: [swift-users] Swift 3.1 String(

2017-04-05 Thread Vladimir.S via swift-users
On 05.04.2017 20:30, David Sweeris via swift-users wrote: On Apr 5, 2017, at 07:49, Rien via swift-users wrote: On 05 Apr 2017, at 16:26, Maxim Veksler via swift-users wrote: Hi, Swift 3.1 compiler seems to introduces a new complier warning

Re: [swift-users] [swift-evolution] [Question] Types of functions

2016-10-06 Thread Vladimir.S via swift-users
On 12.11.2016 11:38, Adrian Zubarev via swift-users wrote: (Adrian, are you from the future? ;-) We should move this thread to swift-users. Here is something that I just tried: |func foo(_: Int, _: Int) {} func boo(_: (Int, Int)) {} type(of: foo) == type(of: boo) //=> true ; (((Int, Int)) ->

Re: [swift-users] xcode8 segmentation fault help

2016-09-27 Thread Vladimir.S via swift-users
On 27.09.2016 12:51, Luis Ferro via swift-users wrote: let string = "a simple test" if (string.characters.count > 0) { let words = string.components(separatedBy: " ") let headline = words.map { (var word) -> String in let firstCharacter = word.remove(at: word.startIndex)