on Wed Aug 09 2017, Xiaodi Wu
<[email protected]> wrote:
On Wed, Aug 9, 2017 at 8:22 PM, Brent Royal-Gordon via
swift-evolution <
[email protected]> wrote:
On Jul 19, 2017, at 11:21 AM, Taylor Swift via swift-evolution
< [email protected]>
wrote:
What about `value:`?
`ptr.initialize(value: value)` `ptr.initialize(value: value,
count: 13)` `ptr.initialize(as: UInt16.self, at: 0, value:
value, count: 13)`
Doesn't read as a sentence. Consider how "initialize to 3"
sounds different from "initialize value 3".
Personally, I'd go with:
ptr.initialize(to: value) ptr.initialize(to: value,
repeatCount: 3)
(Or just `repeat`/`repeating` if you don't feel like you need
the word "count" to disambiguate.)
Per Swift API naming guidelines, initializers don't have to read
as sentences IIRC, and I'd be inclined to grant a function named
`initialize(_:)` the same courtesy.
I know it's late to chime in here, but: that's not an initializer.
--
-Dave
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution