Re: [swift-users] KVC - KeyPath in Operation

2017-06-16 Thread somu subscribe via swift-users
Hi Rod and Tony, Thanks a lot ! Regards, Muthu > On 17 Jun 2017, at 12:11 AM, Tony Parker wrote: > > Hi Rod, > > Thanks, we’re looking into it. > > - Tony > >> On Jun 15, 2017, at 9:14 PM, Rod Brown wrote: >> >> Hi Tony and Somu, >> >> I have an open radar for this one which has been out

[swift-users] Intended behavior or bug in Dictionary's new subscript(_:default:)?

2017-06-16 Thread Jens Persson via swift-users
// Swift 4, Xcode 9 beta 1, default toolchain import Foundation var d1 = [Int : String]() d1[1, default: .init()].append("a") d1[2, default: .init()].append("b") d1[3, default: .init()].append("c") d1[1, default: .init()].append("d") print(d1) // [2: "b", 3: "c", 1: "ad"] as expected. var d2 = [

Re: [swift-users] KVC - KeyPath in Operation

2017-06-16 Thread Tony Parker via swift-users
Hi Rod, Thanks, we’re looking into it. - Tony > On Jun 15, 2017, at 9:14 PM, Rod Brown wrote: > > Hi Tony and Somu, > > I have an open radar for this one which has been outstanding for a few months. > > Radar #32191242 > > Hope this helps. > > - Rod > > > >> On 15 Jun 2017, at 10:27 am,

[swift-users] How to rewrite this code using improved numeric protocols of Swift 4

2017-06-16 Thread Jens Persson via swift-users
I've made an unsuccessful attempt to rewrite the below code in a shorter, more generic way using the improved numeric protocols in Swift 4 (BinaryFloatingPoint, FixedWidthInteger et al). So now I'm wondering if anyone would like to give it a try (or declare that it is not possible). The following

Re: [swift-users] Recommended way to collect elements into collection-valued Dictionary?

2017-06-16 Thread Jens Persson via swift-users
Ah, exactly what I was looking for, thanks! On Friday, June 16, 2017, Ben Cohen wrote: > Hi – yes, there are a couple of things you can do: > > You don’t have to rely on ExpressibleByArrayLiteral. > RangeReplaceableCollection guarantees an empty init, so instead of [], you > can write Value(). >