e.g. for this:
struct Ver {
let x, y, z: Double
}
Vec(1, 2, 3)
or for external argument names like "with:" "for:", "from:", "at:"
e.g. for this:
struct Ver {
let x, y, z: Double
}
Vec(1, 2, 3)
or for external argument names like "with:" "for:", "from:", "at:"
let's explore this for a moment. why init only? same logic for any function:
func foo(_ value: String) {
value = value // Cannot assign to value: 'value' is a 'let' constant
self.value = value // but it can't be anything but this, so why not just allow the above?
}
imho this doesn't have a good (pros - cons)/cost ratio... it only saves 5 chars at the cost of increased cognitive load and compiler complexity. but if to consider this at all then not just for inits.