on Mon Dec 26 2016, Tim Vermeulen <[email protected]> wrote:
> I’ve never seen anyone use the empty init for it before, and if I ever > will, I’ll probably discourage it. What is it for, anyways? Isn’t > `Int.allZeros` enough? Well, that interface has to do with Int's role as a BitwiseOperationsType, and is going away (see https://github.com/apple/swift/pull/3796/commits/b9c910a2b94af461fc5de321cf12bf1cf45cb234) >> On 26 Dec 2016, at 18:09, David Sweeris <[email protected]> wrote: >> >> >>> On Dec 26, 2016, at 09:01, Tim Vermeulen via swift-evolution >>> <[email protected]> wrote: >>> >>> Then why is Int() allowed, and why does that return 0? >> >> Predictability, I'd guess. The memory has to be initialized to >> *something*. And, IIRC, some architectures can 0 out memory faster >> than filling it with some other pattern. >> >> - Dave Sweeris > > _______________________________________________ > swift-evolution mailing list > [email protected] > https://lists.swift.org/mailman/listinfo/swift-evolution -- -Dave _______________________________________________ swift-evolution mailing list [email protected] https://lists.swift.org/mailman/listinfo/swift-evolution
