by jjoonathan · 12y ago · 0 comments
rectangle->set(10,10,20,20,true,false)
you get something that can be understood without taking a trip to the API docs: [rectangle setX:10 y:10 width:20 height:20 updateBSP:YES clipToParent:NO]
It's a pity they are moving away from this syntax in Swift. It's the right move -- I hear nothing but hate for it from those who don't actually use it (i.e. the people who should be Swift's target audience) -- but it's still a pity.Otherwise, it would be very confusing that two different syntax are used for similar purpose.
func join(string s1: String, toString s2: String, withJoiner joiner: String)
-> String {
return s1 + joiner + s2
}
join(string: "hello", toString: "world", withJoiner: ", ")
// returns "hello, world"
[1]: https://developer.apple.com/library/ios/documentation/swift/...