<div dir="ltr"><div><div>let tenXs = String(count: 10, repeatedValue: Character("X"))</div><div>let tenYs = String(count: 10, repaetedValue: Character("Y"))</div><div>print(tenXs) // Prints XXXXXXXXXX</div><div>print(tenYs) // Prints (10, "Y")</div><div><br></div><div>So, why doesn't tenYs print the expected YYYYYYYYYY?</div><div>- Because of the slightly misspelled repeatedValues parameter label.</div><div><br></div><div>Then why no compile time error for the misspelled parameter label?</div><div>- Because of this String intializer: public init<T>(_ instance: T)</div></div><div><br></div><div>I guess there are other similar examples, but I happened to stumble upon this one just now.</div><div><br></div><div>Should they be considered a problem?</div><div><br></div><div>Is this an example of a problem that will be solved by removing tuple splat?</div><div><br></div>
</div>