<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><a href="https://swift.org/documentation/api-design-guidelines" class="">Swift API Design Guide</a> says :<div class=""><br class=""></div><div class="">> The first argument to initializer and factory methods calls should not form a phrase starting with the base name</div><div class=""><br class=""></div><div class="">Specially, it advises us against writing things like :</div><div class=""><br class=""></div><div class=""><div class="">> let foreground = Color(havingRGBValuesRed: 32, green: 64, andBlue: 128) <br class=""></div><div class="">> let newPart = factory.makeWidget(havingGearCount: 42, andSpindleCount: 14) <br class=""></div><div class="">> let ref = Link(to: destination) </div></div><div class=""><br class=""></div><div class="">But in UIKit, the Swift Standard Library or in Foundation, we find code like :</div><div class=""><br class=""></div><div class=""><div class=""> struct Array<T> {</div><div class=""> // ...<br class=""> init(repeating repeatedValue: Array.Element, count: Int)<br class=""> }</div><div class=""><br class=""></div><div class=""> struct Data {</div><div class=""> // ...</div><div class=""> init(referencing reference: NSData)</div><div class=""> }</div><div class=""><br class=""> class UIImage {</div><div class=""> // …</div><div class=""> init?(named name: String, in bundle: Bundle?, compatibleWith traitCollection: UITraitCollection?)<br class=""> }</div><div class=""><br class=""></div><div class="">I understand that some UIKit methods inherit their ObjC declarations like <a href="https://developer.apple.com/documentation/uikit/uiimage/1624154-imagenamed?language=objc" class="">imageNamed:inBundle:compatibleWithTraitCollection:</a>.</div><div class="">But what about Foundation and the Swift Standard Library ?</div></div><div class=""><br class=""></div><div class="">I agree that the initializers respect the Swift fundamentals : clean, short, readable, and consistent.</div><div class="">But the guide seems to be clear about it : we should not write such things.</div><div class=""><br class=""></div><div class="">Could someone shed some light on this point for me ? The subtlety about it.</div></body></html>