[swift-evolution] [Pitch/Reality Check] Allow instance members as parameter default values

Tino Heth 2th at gmx.de
Wed Feb 22 13:45:35 CST 2017

It's nothing that is miss all the time, but I was informed about this limitation by the compiler before ;-), so unless there are some unexpected downsides, it should be added — and I wouldn't limit it to instance members:
Other parameters could be useful defaults as well (or think of scenarios like
func addPerson(firstName: String, lastName: String, fullName: String = firstName + lastName))

More information about the swift-evolution mailing list