raywenderlich/swift-style-guide — pull request #51 by gregheo (2014-12-03 02:26:22+00:00)
Title: new struct inits over old C functions

I think that all new code (or code that's being updated) should use the new struct initializers.

I personally never liked CGPointMake() and am now glad that I can write CGPoint(x: 10, y: 20) - it is much much much more readable.

So:

- CGPoint(x:, y:) over CGPointMake
- CGSize(width:, height:) over CGSizeMake
- CGRect(x:, y:, width:, height:) over CGRectMake

How does the rest of you feel about that?
If "yes, that's awesome" - anymore examples we need to highlight?

And yeah - I know that Apple might change the underlying structure for CGPoint, but I think we should stop living and fear and assume that a point is gonna be made of an X and a Y in at least our lifetime.